Skip to content

Commit cb7da86

Browse files
author
VladimirAmiorkov
committed
chore: update "pop over modal" example with new API
1 parent 2ce8007 commit cb7da86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewContainerRef, Input, ViewChild } from "@angular/core";
1+
import { Component, ViewContainerRef, Input, ViewChild, ElementRef } from "@angular/core";
22
import { Router, NavigationEnd } from "@angular/router";
33
import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
44
import { 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

2424
export 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

Comments
 (0)