Skip to content

Commit

Permalink
Merge pull request #138 from algolia/fix/angular
Browse files Browse the repository at this point in the history
fix(angular): do not launch the directive if autocomplete has a value
  • Loading branch information
vvo authored Jan 6, 2017
2 parents be1dc19 + f96a1ba commit 4a305f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/angular/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ angular.module('algolia.autocomplete', [])
datasets: '&aaDatasets'
},
link: function(scope, element, attrs) {
if (!element.hasClass('autocomplete') && attrs.autocomplete !== '') return;
attrs = attrs; // no-unused-vars
scope.options = $parse(scope.options)(scope);
if (!scope.options) {
Expand Down

0 comments on commit 4a305f6

Please sign in to comment.