fix(angular): modal and popover support

This commit is contained in:
Manu Mtz.-Almeida
2018-03-13 20:53:17 +01:00
parent 6e2ca85b2a
commit 9a0755a268
9 changed files with 80 additions and 50 deletions

View File

@@ -1,10 +1,20 @@
import { Injectable } from '@angular/core';
import { ModalOptions } from '@ionic/core';
import { OverlayBaseController } from '../util/overlay';
import { AngularDelegate } from '..';
@Injectable()
export class ModalController extends OverlayBaseController<ModalOptions, HTMLIonModalElement> {
constructor() {
constructor(
private angularDelegate: AngularDelegate,
) {
super('ion-modal-controller');
}
create(opts?: ModalOptions): Promise<HTMLIonModalElement> {
return super.create({
...opts,
delegate: this.angularDelegate
});
}
}