1- import { Component , ViewContainerRef , Input , ViewChild } from "@angular/core" ;
1+ import { Component , ViewContainerRef , Input , ViewChild , ElementRef } from "@angular/core" ;
22import { Router , NavigationEnd } from "@angular/router" ;
33import { ModalDialogService , ModalDialogOptions } from "nativescript-angular/directives/dialogs" ;
44import { ModalComponent } from "../modal/modal.component" ;
@@ -16,14 +16,14 @@ import { ModalViewComponent } from "~/modal-shared/modal-view.component";
1616 <Button text="Show Modal Without Frame" (tap)="onModalNoFrame()" textAlignment="left"></Button>
1717 <Button text="Show Modal Page With Frame" (tap)="onModalFrame()" textAlignment="left"></Button>
1818 <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>
2121</StackLayout>`
2222} )
2323
2424export class BasicsNavigationComponent {
2525
26- @ViewChild ( "popoverButtonComp" ) popoverButtonComp ;
26+ @ViewChild ( "popoverButtonComp" ) popoverButtonComp : ElementRef ;
2727 @Input ( ) col : number ;
2828 constructor (
2929 private modal : ModalDialogService ,
@@ -94,7 +94,7 @@ export class BasicsNavigationComponent {
9494 ios : {
9595 presentationStyle : UIModalPresentationStyle . Popover
9696 } ,
97- sourceView : this . popoverButtonComp
97+ target : this . popoverButtonComp . nativeElement
9898 } ;
9999
100100 this . modal . showModal ( ModalViewComponent , options )
0 commit comments