Skip to content

Commit

Permalink
fix(core): fix module injection
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBGod committed Nov 2, 2017
1 parent 1dad621 commit 878ee24
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
NgModule,
ModuleWithProviders,
Optional,
SkipSelf
} from '@angular/core';
import { NgModule, ModuleWithProviders } from '@angular/core';

import { ScrollSpyService } from './core/service';
import { ScrollSpyDirective } from './core/window.directive';
Expand All @@ -21,14 +16,6 @@ export * from './plugin/index.service';
exports: [ ScrollSpyDirective, ScrollSpyElementDirective ]
})
export class ScrollSpyModule {
constructor(@Optional() @SkipSelf() parentModule: ScrollSpyModule) {
if (parentModule) {
throw new Error(
'ScrollSpyModule.forRoot() called twice. Lazy loaded modules should use ScrollSpyModule instead.',
);
}
}

static forRoot(): ModuleWithProviders {
return {
ngModule: ScrollSpyModule,
Expand Down

0 comments on commit 878ee24

Please sign in to comment.