uib-typeahead不起作用

时间:2016-12-01 07:12:45

标签: javascript angularjs angularjs-scope angular-ui-bootstrap

我已经实施了大量时间的uib-typeahead,但我无能为力,为什么它不能正常工作

我想在uib-typeahead中获取项目名称 我的代码就像这样

$scope.suggestTestbySpeciality = function( texts , sp_id) {
        var spe_id = sp_id.speciality_id;
$http.post('/youclikc/data/searchTest?speciality_id='+spe_id+'&searchtext='+texts)
                        .then(function(response) {

                        return  response.data.testrecords.rows;

                                                 });
                             };

功能的Console.log就像这样

enter image description here

Angular就像:

<div class="col-md-3 col-sm-3 col-xs-12 form-group has-feedback">
<input  type="text"  uib-typeahead="itemz.test_name as itemz.test_name for itemz in suggestTestbySpeciality($viewValue, data1.template_name) | limitTo:8"
 ng-model="templateVo.test_name" placeholder ="Template Test Name"  class="form-control" ></input>
                        </div>

0 个答案:

没有答案