nativescript-angular icon indicating copy to clipboard operation
nativescript-angular copied to clipboard

Webview breaks Angular bindings within template

Open u14040426 opened this issue 9 years ago • 2 comments

Hey there,

I hope there is a simple solution to this problem

Problem I have a webview where I do a few actions [payment gateway], when the action is complete (I check this by looking at the onLoadFinishedEvent and its url which matches a predefined url I set), is set a component boolean field to TRUE.

This boolean field is binded to a Label for debugging purposed, its default value is false, but when the function is reached where it changes it to true, the label value doesnt change.

Tried I put a button in the component which simply alerts the boolean status, and believe it or not, the instant I press the button, the label changes to true and the alert pops up and says true.

Possible Reason I feel as if the "focus" of the component is within the webview and the rest of the component "freezes" while in that webview focus so variable changes don't work etc.

u14040426 avatar Jun 29 '17 08:06 u14040426

And I have to mention that if I do not alert the boolean field it doesnt work. So I have to access the field for it to update

u14040426 avatar Jun 29 '17 08:06 u14040426

Used ChangeDetectorRef detectChanges() method and this worked

u14040426 avatar Jul 03 '17 16:07 u14040426