I am trying to add autocomplete using angularJS and restangular.
http://plnkr.co/edit/Ud0c34afYZvHJ6ZQQX9N?p=preview
I am not sure how to add the following in order to make autocomplete work. Could someone suggest how to make this work
angular.module('emps', ['restangular']).directive('autoComplete', function($timeout) {
return function($scope, iElement, iAttrs) {
iElement.autocomplete({
source: $scope[iAttrs.uiItems],
select: function() {
$timeout(function() {
iElement.trigger('input');
}, 0);
}
});
};
});