fix(angular): change detection in deep ViewContainers

This commit is contained in:
Manu Mtz.-Almeida
2018-04-10 23:51:59 +02:00
parent 4d23cba8a0
commit 850d7fc74d
10 changed files with 182 additions and 172 deletions

View File

@ -1,14 +1,16 @@
import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
import { ComponentFactoryResolver, Injectable, Injector, ViewContainerRef } from '@angular/core';
import { PopoverOptions } from '@ionic/core';
import { OverlayBaseController } from '../util/overlay';
import { AngularDelegate } from './angular-delegate';
@Injectable()
export class PopoverController extends OverlayBaseController<PopoverOptions, HTMLIonPopoverElement> {
constructor(
private cfr: ComponentFactoryResolver,
private injector: Injector,
private angularDelegate: AngularDelegate,
private resolver: ComponentFactoryResolver,
private injector: Injector,
private location: ViewContainerRef,
) {
super('ion-popover-controller');
}
@ -16,7 +18,7 @@ export class PopoverController extends OverlayBaseController<PopoverOptions, HTM
create(opts?: PopoverOptions): Promise<HTMLIonPopoverElement> {
return super.create({
...opts,
delegate: this.angularDelegate.create(this.cfr, this.injector)
delegate: this.angularDelegate.create(this.resolver, this.injector, this.location)
});
}
}