-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(angular): create angular delegate
- Loading branch information
1 parent
f398b3a
commit 3b5f758
Showing
5 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { ComponentFactoryResolver, Injectable, Injector } 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() { | ||
constructor( | ||
private cfr: ComponentFactoryResolver, | ||
private injector: Injector, | ||
private angularDelegate: AngularDelegate, | ||
) { | ||
super('ion-popover-controller'); | ||
} | ||
|
||
create(opts?: PopoverOptions): Promise<HTMLIonPopoverElement> { | ||
return super.create({ | ||
...opts, | ||
delegate: this.angularDelegate.create(this.cfr, this.injector) | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters