It's driving me crazy. Our integration with some ATSs involves sending queries and setting variables in the scope upon receiving responses. I always make sure to set the variables within a $scope.$apply() to ensure proper updating. Everything was working fine until recently when things started acting up. After spending hours debugging, something stood out that perfectly captured the bizarre nature of the issue. Take a look at the code snippet below:
<div ng-show="aR.g" ng-bind="aR.g ? 'g yes' : 'g no'"></div>
The idea is simple - if visible, display "g yes", if hidden, show "g no". But here's the strange part: the element was hidden, yet upon inspection, this is what I found:
<div ng-show="aR.g" ng-bind="aR.g ? 'g yes' : 'g no'" class="ng-binding ng-hide">g yes</div>
This indicates that ng-show evaluated aR.g as false, while ng-bind evaluated it as true. How can this discrepancy even occur? Is this a bug?