Skip to content

Commit

Permalink
fix: fix router module constructor token declaration
Browse files Browse the repository at this point in the history
Cherry-picked from 82e0aa2
  • Loading branch information
EmmanuelRoux committed Mar 31, 2024
1 parent eeb6d68 commit 0ed5c0c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions projects/ngx-matomo-client/router/matomo-router.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import {
forwardRef,
Inject,
ModuleWithProviders,
NgModule,
Optional,
SkipSelf,
} from '@angular/core';
import { ɵMATOMO_ROUTER_ENABLED as MATOMO_ROUTER_ENABLED } from 'ngx-matomo-client/core';
import {
MATOMO_ROUTER_CONFIGURATION,
Expand All @@ -14,7 +21,10 @@ export class MatomoRouterModule {
constructor(
private readonly router: MatomoRouter,
@Optional() @SkipSelf() parent?: MatomoRouterModule,
@Optional() @SkipSelf() parentDeprecated?: NgxMatomoRouterModule
@Inject(forwardRef(() => NgxMatomoRouterModule))
@Optional()
@SkipSelf()
parentDeprecated?: NgxMatomoRouterModule
) {
if (!parent && !parentDeprecated) {
// Do not initialize if it is already (by a parent module)
Expand Down Expand Up @@ -49,7 +59,10 @@ export class NgxMatomoRouterModule {
constructor(
private readonly router: MatomoRouter,
@Optional() @SkipSelf() parent?: MatomoRouterModule,
@Optional() @SkipSelf() parentDeprecated?: NgxMatomoRouterModule
@Inject(forwardRef(() => NgxMatomoRouterModule))
@Optional()
@SkipSelf()
parentDeprecated?: NgxMatomoRouterModule
) {
if (!parent && !parentDeprecated) {
// Do not initialize if it is already (by a parent module)
Expand Down

0 comments on commit 0ed5c0c

Please sign in to comment.