angularjs - how to make jquery autocomplete in angular js -


could please tell me how make jquery autocomplete in angular js.i trying make type of autocomplete in angular js http://jsfiddle.net/dfapnrxf/

or https://jqueryui.com/autocomplete/

so make custom directive .but please tell me doing wrong ?here code

http://codepen.io/anon/pen/enzlpp

var app=angular.module("ionicapp",['ionic']); app.directive('autosemple',function(){      return{         restrict:'a',         scope:{          },         link:function(scope,element,attr){             $( "#tags" ).autocomplete({               //  source: availabletags             });         }     } }) app.controller('cnt',function($scope){     $scope.availabletags = [         "actionscript",         "applescript",         "asp",         "basic",         "c",         "c++",         "clojure",         "cobol",         "coldfusion",         "erlang",         "fortran",         "groovy",         "haskell",         "java",         "javascript",         "lisp",         "perl",         "php",         "python",         "ruby",         "scala",         "scheme"     ]; }) 

as mentioned custom directives want learn, here simple angular.js auto complete directive works jqueryui auto complete widget server side data.

https://github.com/coded-brain/autocomplete-directive


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -