Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with using *ngIf and *ngSwitch directives in Modal Page for iOS #793

Open
tsonevn opened this issue May 11, 2017 · 1 comment
Open

Comments

@tsonevn
Copy link
Contributor

tsonevn commented May 11, 2017

Both *ngIf and *ngSwitch directives will not work as expected for iOS, while using it in Modal Page.
Reported by @piotrilski

It seems to be affecting usage of *ngIf and *ngSwitch on angular as well. I made a fork of sdk-examples-ng repo here: https://github.com/piotrilski/nativescript-sdk-examples-ng/tree/pilski/modal-issue
Changes I made: https://github.com/piotrilski/nativescript-sdk-examples-ng/pull/1/files
To see what's going on simply run it and go to ModalPage -> Modal Page Example and hit first EnterStartDate button to open a slightly modified modal. It behaves exactly like in

@piotrilski
Copy link

There's a workaround described by @kssfilo here: NativeScript/NativeScript#4151 (comment)

TL;DR - importing Page and using this method:
page.nativeView.setNeedsLayout()
once the value binded to ngIf/ngSwitch changed sorted out the issue.

@SvetoslavTsenov SvetoslavTsenov self-assigned this May 31, 2017
@tsonevn tsonevn assigned sis0k0 and unassigned SvetoslavTsenov Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants