首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Bootstrap typehead不工作

Bootstrap typehead不工作
EN

Stack Overflow用户
提问于 2014-03-12 20:05:06
回答 1查看 145关注 0票数 1

在下面的代码中,我使用Bootstrap typeahead填充国家/地区。我在jQuery中初始化typeahead,但是值没有出现在文本框中。如果我去掉ng-repeat,它就能完美地工作

代码语言:javascript
复制
<div ng-repeat='item in array'>
    <input class="typeahead" type="text" id="Text23" ng-model="dtl.InstCn" ng-required="true" placeholder="Country">
</div>
<script>
    $('.typeahead').typeahead({source: sourceArr});
</script>

如何将typehead与ng-repeat一起使用?

EN

回答 1

Stack Overflow用户

发布于 2014-03-12 20:30:30

你能提供一个柱塞吗?我不能理解你的代码片段中的ng-repeat的含义。您没有使用ng-repeat中的任何内容。

或者使用AngularUI中的UI Bootstrap (用纯AngularJS编写的引导组件)试试:

http://angular-ui.github.io/bootstrap/#/typeahead

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22350983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档