角引导预输入与角1.3.0工作 [英] Angular bootstrap typeahead not working with Angular 1.3.0

查看:106
本文介绍了角引导预输入与角1.3.0工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个小plunker表明,这是行不通的。任何人都可以请帮我如何使用预输入与1.3.0 angularJS /提供替代解决方案。我们使用它与角引导0.11.0和引导的最新版本。我们code在很大程度上依赖于1.3.0推出NG的消息

这里是plunker链接

正如你可以清楚地看到,单击事件,向上和向下箭头不工作。加入一些code键使太高兴了。 :)

 < D​​IV CLASS =集装箱液NG控制器=TypeaheadCtrl>
      < H4>静态数组< / H4>
      < pre>产品型号:{{选择| JSON}}< / pre>
      <输入类型=文本NG模型=选择预输入=,在国家状态状态|过滤器:$ viewValue | limitTo:8级=表格控/>    < / DIV>


解决方案

您有三种选择当前:


  1. 降级angular.js版 1.3.0-beta.10

    该错误是由该 ngIf 固定<一个引起href=\"https://github.com/angular/angular.js/commit/d71df9f83cd3882295ca01b1bb8ad7fb024165b6\">d71df9这是降落在 1.3.0-beta.11


  2. 降级角引导版本 0.10.0

    预输入指令已开始在 0.11.0 ngIf C $ C>,所以降级到 0.10.0 也将有效。


  3. 等待角引导 0.12.0

    有已经是一个公开的问题#2474 ,它计划将固定在 0.12.0


编辑:看来这个问题已经修复这个承诺<一href=\"https://github.com/angular-ui/bootstrap/commit/a0be450ddb7fff556b5fa4a0c2ddcbbe43588dc8\">a0be450d在登陆 0.11.2

I have created a small plunker to show that this is not working. Can anyone please help me how to use typeahead with 1.3.0 angularJS /provide alternate solutions. We are using it with angular-bootstrap 0.11.0 and the latest version of bootstrap. Our code heavily relies on ng-messages introduced in 1.3.0

Here is the plunker link

As you can clearly see, the click events, up arrows and down arrows dont work. Adding some code to make SO happy. :)

 <div class="container-fluid" ng-controller="TypeaheadCtrl">
      <h4>Static arrays</h4>
      <pre>Model: {{selected | json}}</pre>
      <input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control" />

    </div>

解决方案

You have three choices currently:

  1. Downgrade angular.js version to 1.3.0-beta.10

    The bug is caused by this ngIf fixed d71df9 which is landed in 1.3.0-beta.11

  2. Downgrade angular-bootstrap version to 0.10.0

    The typeahead directive has started to use ngIf in 0.11.0, so downgrade to 0.10.0 will also works.

  3. Wait for angular-bootstrap 0.12.0

    There is already an open issue #2474 , it's planned to be fixed in 0.12.0

EDIT: It seems the issue has been fixed by this commit a0be450d and landed in 0.11.2.

这篇关于角引导预输入与角1.3.0工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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