Skip to content

Commit

Permalink
fix(core): works with AOT compiler
Browse files Browse the repository at this point in the history
closes #61
  • Loading branch information
JonnyBGod committed Nov 29, 2016
1 parent 8e2dfe1 commit 77e69a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function provideForRootGuard(angulartics2: Angulartics2): any {
throw new Error(
`Angulartics2Module.forRoot() called twice. Lazy loaded modules should use Angulartics2Module.forChild() instead.`);
}

return 'guarded';
}

Expand All @@ -31,11 +32,6 @@ export class Angulartics2Module {
constructor(@Optional() @Inject(ANGULARTICS2_FORROOT_GUARD) guard: any) {}

static forRoot(providers: Array<any>): ModuleWithProviders {
if (!providers) {
throw new Error(
`Angulartics2Module.forRoot() called without providers.`);
}

return {
ngModule: Angulartics2Module,
providers: [
Expand Down

0 comments on commit 77e69a9

Please sign in to comment.