ng-hide/ng-show within an ng-hide/ng-show not working properly in **chrome** on first trigger, second time it reflects just fine

。_饼干妹妹 提交于 2019-12-24 07:29:39

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/25052757/ng-hide-ng-show-within-an-ng-hide-ng-show-not-working-properly-in-chrome-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!