0
私はmongodから詳細を取得し、先行するテキストボックスとして表示する必要があるプロジェクトで作業しています。角度jの先頭が機能しない
<div class="form-group">
<label for="resourceName" class="col-sm-4 control-label">Enter the Page Name<span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" name="title" ng-model="selected" typeahead="getPageName()" required>
</div>
</div>
コントローラー:
私のコードは
HTMLです
$scope.getPageName = function(){
return $http.get('/api/getPageName').success(function(response){
return limitToFilter(response.data, 15);
}).error(function(response){
});
};
しかし、問題は、私はテキストボックスに入力すると機能が全く呼ば取得されていない、ということです。あなたが入力を開始した後、事前
だから、あなたはあなたの先行入力のために何を使用していますか?なぜあなたの質問は、typeahead.jsとangular-ui-typeaheadの両方でタグ付けされていますか?あなたのマークアップは確かにあなたが角度ui-typeaheadで使用するようには見えません:https://angular-ui.github.io/bootstrap/#!#typeahead –