ng-hide/ng-show中的ng-hide/ng-show在第一次触发时无法在** chrome **中正常工作,第二次它反映得很好 [英] ng-hide/ng-show within an ng-hide/ng-show not working properly in **chrome** on first trigger, second time it reflects just fine

查看:103
本文介绍了ng-hide/ng-show中的ng-hide/ng-show在第一次触发时无法在** chrome **中正常工作,第二次它反映得很好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一种情况,其中存在带有建议列表的编辑输入,当我对ng-change进行输入时,该列表会显示相关建议,并且如果没有可用数据,则会显示异常.但是在chrome中,我遇到一个问题,如果没有search(ng-change)本身,带有输入的列表就会显示为无数据异常"

我有这样的东西:

<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>

此处列表在第一次编辑时会以chrome的形式从其自身出现,第二次工作正常!

解决方案

这是一个错误!所以 此问题应在最新的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

这篇关于ng-hide/ng-show中的ng-hide/ng-show在第一次触发时无法在** chrome **中正常工作,第二次它反映得很好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆