Description
Bug Description
I have a modal view that I am opening using the ModalDialogService. Almost none of the views labels, image, or buttons were behaving as expectedly. After spending hours to track down the issue here is what I found:
If the root AppComponent has changeDetection: ChangeDetectionStrategy.OnPush
set, no bindings will be properly set in any modal dialog in the app.
This includes binding button text, label text, Image source.
This does not seem to prevent events from firing.
Reproducing
I have created a nativescript playground app that shows the issue:
https://play.nativescript.org/?template=play-ng&id=rxarWp&v=3
If you tap 'Open Modal' the modal should have a Button and 3 Labels, however two of those labels don't show up because their text was set using a binding.
To fix those bindings all you need to do is comment out the line
changeDetection: ChangeDetectionStrategy.OnPush
from app.component.ts
.
Thanks for your help!