Angular bootstrap typeahead不能使用Angular 1.3.0

时间:2021-07-30 10:06:04

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

我创建了一个小的plunker来表明这不起作用。谁能帮助我如何使用1.3.0 angularJS /提供备用解决方案的typeahead。我们正在使用angular-bootstrap 0.11.0和最新版本的bootstrap。我们的代码严重依赖于1.3.0中引入的ng-messages

Here is the plunker link

这是plunker链接

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

你可以清楚地看到,点击事件,向上箭头和向下箭头不起作用。添加一些代码让SO开心。 :)

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

1 个解决方案

#1


11  

You have three choices currently:

您目前有三种选择:

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

    将angular.js版本降级为1.3.0-beta.10

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

    该错误是由这个ngIf修复的d71df9引起的,它在1.3.0-beta.11中登陆

  2. Downgrade angular-bootstrap version to 0.10.0

    将angular-bootstrap版本降级到0.10.0

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

    typeahead指令已开始在0.11.0中使用ngIf,因此降级到0.10.0也可以。

  3. Wait for angular-bootstrap 0.12.0

    等待angular-bootstrap 0.12.0

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

    已经有一个未解决的问题#2474,计划修复为0.12.0

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

编辑:似乎问题已由此提交a0be450d修复并降落在0.11.2。

#1


11  

You have three choices currently:

您目前有三种选择:

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

    将angular.js版本降级为1.3.0-beta.10

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

    该错误是由这个ngIf修复的d71df9引起的,它在1.3.0-beta.11中登陆

  2. Downgrade angular-bootstrap version to 0.10.0

    将angular-bootstrap版本降级到0.10.0

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

    typeahead指令已开始在0.11.0中使用ngIf,因此降级到0.10.0也可以。

  3. Wait for angular-bootstrap 0.12.0

    等待angular-bootstrap 0.12.0

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

    已经有一个未解决的问题#2474,计划修复为0.12.0

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

编辑:似乎问题已由此提交a0be450d修复并降落在0.11.2。