如何在应用角度类型头的输入上触发模糊?

时间:2016-06-27 14:07:46

标签: angularjs bootstrap-typeahead angular-bootstrap

我使用角度自举类型头进行小型自动完成,我需要触发输入的模糊,我已经在其上应用了类型头的选择。

HTML code:

<input class="form-control" ng-model="customItemSelected" typeahead-template-url="customAutoCompleteTemplate.html"
 type="text" typeahead-on-select="onSelect($item)" />

JS代码

$scope.onSelect = function(stateItem){
$scope.customItemSelected = "";
// trigger the blur of input so that placeholder appear
}

1 个答案:

答案 0 :(得分:1)

<强> HTML

broker.addConnector("udp://"+host+":"+AMQPport);

<强> JS

<input type="text" ng-model="sales" name="example-input-normal" 
                                                        typeahead="value.CompanyName for value in Debtors | filter:$viewValue | limitTo:8" typeahead-focus/>