mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
26 lines
752 B
TypeScript
26 lines
752 B
TypeScript
import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
|
|
import { PopoverOptions, popoverController } from '@ionic/core';
|
|
|
|
import { OverlayBaseController } from '../util/overlay';
|
|
|
|
import { AngularDelegate } from './angular-delegate';
|
|
|
|
@Injectable()
|
|
export class PopoverController extends OverlayBaseController<PopoverOptions, HTMLIonPopoverElement> {
|
|
|
|
constructor(
|
|
private angularDelegate: AngularDelegate,
|
|
private resolver: ComponentFactoryResolver,
|
|
private injector: Injector,
|
|
) {
|
|
super(popoverController);
|
|
}
|
|
|
|
create(opts: PopoverOptions): Promise<HTMLIonPopoverElement> {
|
|
return super.create({
|
|
...opts,
|
|
delegate: this.angularDelegate.create(this.resolver, this.injector)
|
|
});
|
|
}
|
|
}
|