1

I am using angular 1.5 version and angularjs ui bootstrap 1.3.3 , typeahead is not working as expected. On typing in the textbox the appropriate autocomplete options are not getting displayed. I am new to angularjs can anyone please help. Is there anything wrong in the code. Also is there any way in which I can create the autocomplete textbox using only angularjs without bootstrap.

Below is the code for the same

    <script type="text/javascript" src="/docs/js/angular.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.3.3/ui-bootstrap-tpls.js"></script>
    <script type="text/javascript" src="/docs/js/controller/invoiceApprController.js"></script>
<div id="ng-app" ng-app="TabsApp">
    <input type="text" ng-model="name" ng-controller="DController" typeahead="dealVal.Id as dealVal.name for dealVal in deals| filter:name">
</div>

Below is the code for the controller in the js file included

var angularModule= angular.module('TabsApp', ['ui.bootstrap']);
angularModule.controller('DController',['$scope', '$http', function($scope,$http){
        $http
        .get('/url').success(function(data, status) {
            $scope.deals = data.items;
        })
        .error(function(data, status) {
                   alert(status);
        });
        }]);
1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.