@dsivd/prestations-ng 19.0.2-beta.2 → 19.0.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, model, input, viewChildren, viewChild, forwardRef, output, computed, linkedSignal, DestroyRef, effect, Directive, ChangeDetectorRef, Pipe, Component, contentChildren, InjectionToken, signal, ElementRef, makeEnvironmentProviders, ErrorHandler, provideAppInitializer, importProvidersFrom, NgZone, untracked, contentChild, TemplateRef } from '@angular/core';
2
+ import { Injectable, inject, model, input, viewChildren, viewChild, forwardRef, output, computed, linkedSignal, DestroyRef, effect, Directive, ChangeDetectorRef, Pipe, Component, contentChildren, InjectionToken, EnvironmentInjector, runInInjectionContext, signal, ElementRef, makeEnvironmentProviders, ErrorHandler, provideAppInitializer, importProvidersFrom, NgZone, untracked, contentChild, TemplateRef } from '@angular/core';
3
3
  import { takeUntilDestroyed, toObservable, outputToObservable } from '@angular/core/rxjs-interop';
4
4
  import { Router, ActivatedRoute, RouterLink, NavigationStart, NavigationEnd } from '@angular/router';
5
5
  import { Subject, BehaviorSubject, combineLatest, of, filter as filter$1, tap as tap$1, throwError, switchMap as switchMap$1, forkJoin, from, concatMap, toArray, EMPTY, startWith, merge, interval, withLatestFrom, map as map$1, concat } from 'rxjs';
@@ -2496,6 +2496,7 @@ class FoehnNavigationService {
2496
2496
  this.location = inject(Location);
2497
2497
  this.demandeTransmitInterceptor = inject(DemandeTransmitInterceptor);
2498
2498
  this.eventsLoggerService = inject(SdkEventsLoggerService);
2499
+ this.injector = inject(EnvironmentInjector);
2499
2500
  this.isInit = false;
2500
2501
  this.initializedAndRouteActivated = new BehaviorSubject(false);
2501
2502
  this.linearRouting = true;
@@ -2740,7 +2741,7 @@ class FoehnNavigationService {
2740
2741
  return !canActivate.some((guardFn) => !this.evaluateGuard(guardFn));
2741
2742
  }
2742
2743
  evaluateGuard(guardFn) {
2743
- const guardResult = guardFn(this.route.snapshot, null);
2744
+ const guardResult = runInInjectionContext(this.injector, () => guardFn(this.route.snapshot, null));
2744
2745
  if (typeof guardResult !== 'boolean') {
2745
2746
  throw new Error('Not implemented: Dynamic routing guards only support boolean results');
2746
2747
  }