Skip to content

Commit

Permalink
remove ANALYZE_FOR_ENTRY_COMPONENTS (#982)
Browse files Browse the repository at this point in the history
* Update uiRouterNgModule.ts

fixes #981

* Update ci.yml

* Update uiView.ts

removed ReflectiveInjector as is deprecated
  • Loading branch information
jpike88 authored Apr 13, 2023
1 parent bf45a80 commit 8cbd06b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions src/directives/uiView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Input,
OnDestroy,
OnInit,
ReflectiveInjector,
ViewChild,
ViewContainerRef,
} from '@angular/core';
Expand Down Expand Up @@ -325,7 +324,7 @@ export class UIView implements OnInit, OnDestroy {
const moduleInjector = context.getResolvable(NATIVE_INJECTOR_TOKEN).data;
const mergedParentInjector = new MergeInjector(moduleInjector, parentComponentInjector);

return ReflectiveInjector.resolveAndCreate(newProviders, mergedParentInjector);
return Injector.create(newProviders, mergedParentInjector);
}

/**
Expand Down
3 changes: 0 additions & 3 deletions src/uiRouterNgModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Ng2StateDeclaration } from './interface';
import {
NgModule,
ModuleWithProviders,
ANALYZE_FOR_ENTRY_COMPONENTS,
Provider,
Injector,
APP_INITIALIZER,
Expand Down Expand Up @@ -35,7 +34,6 @@ export function makeRootProviders(module: RootModule): Provider[] {
return [
{ provide: UIROUTER_ROOT_MODULE, useValue: module, multi: true },
{ provide: UIROUTER_MODULE_TOKEN, useValue: module, multi: true },
{ provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: module.states || [], multi: true },
{
provide: APP_INITIALIZER,
useFactory: onTransitionReady,
Expand All @@ -48,7 +46,6 @@ export function makeRootProviders(module: RootModule): Provider[] {
export function makeChildProviders(module: StatesModule): Provider[] {
return [
{ provide: UIROUTER_MODULE_TOKEN, useValue: module, multi: true },
{ provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: module.states || [], multi: true },
];
}

Expand Down

0 comments on commit 8cbd06b

Please sign in to comment.