Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/router/src/lib/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const INTERNAL_ROUTER_CONFIGURATION = new InjectionToken<InternalRouterCo
{
factory: () => {
const { disabled, enableLinkTracking } = inject(INTERNAL_MATOMO_CONFIGURATION);
const routerConfig = inject(MATOMO_ROUTER_CONFIGURATION, InjectFlags.Optional) || {};
const routerConfig = inject(MATOMO_ROUTER_CONFIGURATION, {optional: true}) || {};

return { ...DEFAULT_ROUTER_CONFIGURATION, ...routerConfig, enableLinkTracking, disabled };
},
Expand Down
8 changes: 4 additions & 4 deletions projects/router/src/lib/page-url-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const MATOMO_PAGE_URL_PROVIDER = new InjectionToken<PageUrlProvider>(
factory: () =>
new DefaultPageUrlProvider(
inject(INTERNAL_ROUTER_CONFIGURATION),
inject(APP_BASE_HREF, InjectFlags.Optional),
inject(APP_BASE_HREF, {optional: true}),
inject(PlatformLocation)
),
}
Expand All @@ -26,10 +26,10 @@ function trimTrailingSlash(str: string): string {

export class DefaultPageUrlProvider implements PageUrlProvider {
constructor(
@Optional()
@Inject(INTERNAL_ROUTER_CONFIGURATION)
// @Optional() @Inject(INTERNAL_ROUTER_CONFIGURATION)
private readonly config: InternalRouterConfiguration,
@Optional() @Inject(APP_BASE_HREF) private readonly baseHref: string | null,
// @Optional() @Inject(APP_BASE_HREF)
private readonly baseHref: string | null,
private readonly platformLocation: PlatformLocation
) {}

Expand Down