Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Different behavior in QA and local development
Message
 
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01628590
Message ID:
01628720
Views:
26
>>BTW, my colleague solved the issue by switching to ng-if instead of ng-show for these two elements. Of course, it doesn't explain the Google Chrome ng-dirty bug, but it does solve that problem. And it's the second time this week he solved problem by implementing ng-if.
>>
>>https://stackoverflow.com/questions/19177732/what-is-the-difference-between-ng-if-and-ng-show-ng-hide#_=_
>
>As mentioned in an earlier reply : ng-show merely hides or shows the element - it's not removed from the DOM.
>ng-if removes or adds the element. I'd guess that with the data source changed and that, with ng-show that caused the ng-dirty to be set. With ng-if the element was created after the data was set so it would still be ng-pristine ?

But that's the strange thing. All fields are bound to currentOperator fields. I've checked the controller's code and there was nothing changing these two particular fields (unless a specific method called to change them). That's why the behavior which was only in Chrome I'd consider a bug. But in any case, ng-if is a workaround against that bug.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform