33 ComponentRef ,
44 Directive ,
55 Injectable ,
6+ Injector ,
67 NgModuleRef ,
7- ReflectiveInjector ,
88 Type ,
99 ViewContainerRef
1010} from "@angular/core" ;
@@ -18,7 +18,7 @@ import { DetachedLoader } from "../common/detached-loader";
1818import { PageFactory , PAGE_FACTORY } from "../platform-providers" ;
1919import { once } from "../common/utils" ;
2020import { topmost , Frame } from "tns-core-modules/ui/frame" ;
21- import { ShowModalOptions } from "tns-core-modules/ui/core/view" ;
21+ import { ShowModalOptions } from "tns-core-modules/ui/core/view" ;
2222
2323export type BaseShowModalOptions = Pick < ShowModalOptions , Exclude < keyof ShowModalOptions , "closeCallback" | "context" > > ;
2424
@@ -126,11 +126,11 @@ export class ModalDialogService {
126126 } ) ;
127127
128128 const modalParams = new ModalDialogParams ( options . context , closeCallback ) ;
129- const providers = ReflectiveInjector . resolve ( [
130- { provide : ModalDialogParams , useValue : modalParams } ,
131- ] ) ;
132129
133- const childInjector = ReflectiveInjector . fromResolvedProviders ( providers , options . containerRef . parentInjector ) ;
130+ const childInjector = Injector . create ( {
131+ providers : [ { provide : ModalDialogParams , useValue : modalParams } ] ,
132+ parent : options . containerRef . injector
133+ } ) ;
134134 const detachedFactory = options . resolver . resolveComponentFactory ( DetachedLoader ) ;
135135 detachedLoaderRef = options . containerRef . createComponent ( detachedFactory , - 1 , childInjector , null ) ;
136136 detachedLoaderRef . instance . loadComponent ( options . type ) . then ( ( compRef ) => {
0 commit comments