Angularjs 角度UI typeahead不显示下拉列表
我正在尝试使用前面的角度UI类型。我的问题是下拉列表没有显示。正在正确调用远程数据并返回数据。。。但是下拉列表拒绝显示Angularjs 角度UI typeahead不显示下拉列表,angularjs,angular-ui,Angularjs,Angular Ui,我正在尝试使用前面的角度UI类型。我的问题是下拉列表没有显示。正在正确调用远程数据并返回数据。。。但是下拉列表拒绝显示 <td colspan="5"> <pre>Model: {{selected| json}}</pre> <input id="AutoCompleteDebtor" type="text" data-ng-model="selected" data-typ
<td colspan="5">
<pre>Model: {{selected| json}}</pre>
<input id="AutoCompleteDebtor"
type="text"
data-ng-model="selected"
data-typeahead="debtor for debtor in Debtors($viewValue)"
class="form-control input-sm"
placeholder="Enter 3 letters of Debtor Name" />
</td>
模型:{selected | json}
更新:Ok-它可以很好地处理字符串名称数组,但是如何处理对象呢
data-typeahead="n.name for n in people
前角字体
angular.module('myApp',['ui.bootstrap']))
.controller('SimpleController',函数($scope){
$scope.people=[
{姓名:'Alan',年龄:23},
{姓名:'Bruce',年龄:24},
{姓名:'Celine',年龄:53},
{姓名:'Dan',年龄:43},
{姓名:'Eric',年龄:23},
{姓名:'Freda',年龄:47},
{姓名:'Greg',年龄:73},
{姓名:'Hanna',年龄:27}
];
});
模型:{selected | json}
我一直在遵循这个例子我在这把小提琴上找到了答案:
根据格雷格的回答,我提前解决了打字问题。以下是我为我的typeahead所做的(希望这对某人有所帮助):
typeahead=“i.t|employeeInfo中i的用户名|过滤器:$viewValue | limito:4”
作为html输入的属性
在控制器中(使用员工资源)
我们需要比这更多的信息,理想情况下,使用实时复制场景。您使用的AngularUI/bootstrap和AngularJS的版本是什么?AngularJS 1.2RC1和AngularJS 1.2RC2.UI Bootstrap 0.6.0、Bootstrap 3.0和Angular v1.0.8中出现了一些突破性的变化。不幸的是,我处理的是敏感信息,所以我现在还不能复制我要做的事情。没有人要求披露信息,请准备一个同等的例子。是的,对不起。我就是不能从工作中做这件事。我会尽快去的。
data-typeahead="n.name for n in people
$scope.employeeInfo = getEmployeeResourceSvc.getEmplInfo.query(function(response){
$scope.employeeInfo= response;
});