且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ng-hide/ng-show中的ng-hide/ng-show在第一次触发时无法在** chrome **中正常工作,第二次它反映得很好

更新时间:2022-10-28 15:27:27

这是一个错误!所以 此问题应在最新的1.4(1.4.9)中修复.您正在使用过时的版本

https://github.com/angular/angular.js/issues/13380

I am having a scenario where an edit input with the suggestion list is there, when I do the entry on ng-change the list appears with the relevant suggestions, and shows exception if no data is available. But in chrome I am having an issues that without the search(ng-change) itself the list with the input appears showing "No data exception"

I am having something like this:

<div ng-show="show on a condition to edit">
  <input  ng-change="callForservicetoDisplayList()" ng-model="enteredValue"/>
  <ul ng-show="only when callForservicetoDisplayList function returns value">
    <li ng-repeat="outputFromthe callForservicetoDisplayList"></li>
  </ul>
</div>

Here the list appears from before itself in chrome on first edit, second time works fine!

This was a bug ! So This should be fixed in latest 1.4 (1.4.9). You are using an outdated version

https://github.com/angular/angular.js/issues/13380