|
1 | | -import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injector, Optional, ViewContainerRef, ɵdetectChanges as detectChanges } from '@angular/core'; |
2 | | -import { ContentView, View, Application, Frame } from '@nativescript/core'; |
| 1 | +import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injector, Optional, ViewContainerRef } from '@angular/core'; |
| 2 | +import { Application, ContentView, Frame, View } from '@nativescript/core'; |
3 | 3 | import { fromEvent, Subject } from 'rxjs'; |
4 | 4 | import { take } from 'rxjs/operators'; |
5 | 5 | import { AppHostAsyncView, AppHostView } from '../../app-host-view'; |
6 | 6 | import { NSLocationStrategy } from '../../legacy/router/ns-location-strategy'; |
7 | 7 | import { once } from '../../utils/general'; |
| 8 | +import { NgViewRef } from '../../view-refs'; |
8 | 9 | import { DetachedLoader } from '../detached-loader'; |
9 | 10 | import { ComponentPortal, TemplatePortal } from '../portal/common'; |
10 | 11 | import { NativeScriptDomPortalOutlet } from '../portal/nsdom-portal-outlet'; |
11 | 12 | import { NativeDialogConfig } from './dialog-config'; |
12 | | -import { NgViewRef } from '../../view-refs'; |
13 | 13 |
|
14 | 14 | export class NativeModalRef { |
15 | 15 | _id: string; |
@@ -103,7 +103,7 @@ export class NativeModalRef { |
103 | 103 | const targetView = new ContentView(); |
104 | 104 | this.portalOutlet = new NativeScriptDomPortalOutlet(targetView, this._config.componentFactoryResolver || this._injector.get(ComponentFactoryResolver), this._injector.get(ApplicationRef), this._injector); |
105 | 105 | const componentRef = this.portalOutlet.attach(portal); |
106 | | - detectChanges(componentRef.instance); |
| 106 | + componentRef.changeDetectorRef.detectChanges(); |
107 | 107 | this.modalViewRef = new NgViewRef(componentRef); |
108 | 108 | if (this.modalViewRef.firstNativeLikeView !== this.modalViewRef.view) { |
109 | 109 | (<any>this.modalViewRef.view)._ngDialogRoot = this.modalViewRef.firstNativeLikeView; |
|
0 commit comments