1
- import { Component , ViewContainerRef , Input , ViewChild } from "@angular/core" ;
1
+ import { Component , ViewContainerRef , Input , ViewChild , ElementRef } from "@angular/core" ;
2
2
import { Router , NavigationEnd } from "@angular/router" ;
3
3
import { ModalDialogService , ModalDialogOptions } from "nativescript-angular/directives/dialogs" ;
4
4
import { ModalComponent } from "../modal/modal.component" ;
@@ -16,14 +16,14 @@ import { ModalViewComponent } from "~/modal-shared/modal-view.component";
16
16
<Button text="Show Modal Without Frame" (tap)="onModalNoFrame()" textAlignment="left"></Button>
17
17
<Button text="Show Modal Page With Frame" (tap)="onModalFrame()" textAlignment="left"></Button>
18
18
<Button text="Show Shared Modal" (tap)="onRootModalTap()" textAlignment="left"></Button>
19
- <Button #popoverButtonComp text="Show Dialog" (tap)="onShowDialog()" textAlignment="left"></Button>
20
- <Button text="Show 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
19
+ <Button text="Show Dialog" (tap)="onShowDialog()" textAlignment="left"></Button>
20
+ <Button #popoverButtonComp text="Show 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
21
21
</StackLayout>`
22
22
} )
23
23
24
24
export class BasicsNavigationComponent {
25
25
26
- @ViewChild ( "popoverButtonComp" ) popoverButtonComp ;
26
+ @ViewChild ( "popoverButtonComp" ) popoverButtonComp : ElementRef ;
27
27
@Input ( ) col : number ;
28
28
constructor (
29
29
private modal : ModalDialogService ,
@@ -94,7 +94,7 @@ export class BasicsNavigationComponent {
94
94
ios : {
95
95
presentationStyle : UIModalPresentationStyle . Popover
96
96
} ,
97
- sourceView : this . popoverButtonComp
97
+ target : this . popoverButtonComp . nativeElement
98
98
} ;
99
99
100
100
this . modal . showModal ( ModalViewComponent , options )
0 commit comments