File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11import {
22 ChangeDetectorRef ,
33 Component ,
4+ createEnvironmentInjector ,
45 Directive ,
56 effect ,
67 EnvironmentInjector ,
@@ -76,10 +77,15 @@ export class NgtRouterOutlet extends RouterOutlet {
7677 private environmentInjector = inject ( EnvironmentInjector ) ;
7778
7879 override activateWith ( activatedRoute : ActivatedRoute , environmentInjector : EnvironmentInjector ) : void {
79- return super . activateWith (
80- activatedRoute ,
81- new NgtOutletEnvironmentInjector ( environmentInjector , this . environmentInjector ) ,
82- ) ;
80+ const activateWithEnvInjector =
81+ this . environmentInjector === environmentInjector
82+ ? environmentInjector
83+ : createEnvironmentInjector (
84+ [ ] ,
85+ new NgtOutletEnvironmentInjector ( environmentInjector , this . environmentInjector ) ,
86+ ) ;
87+
88+ return super . activateWith ( activatedRoute , activateWithEnvInjector ) ;
8389 }
8490}
8591
You can’t perform that action at this time.
0 commit comments