From f96a1bad72212066dab735de08d560cf6122f65b Mon Sep 17 00:00:00 2001 From: Matthieu Dumont Date: Fri, 6 Jan 2017 11:54:05 +0100 Subject: [PATCH] fix(angular): do not launch the directive if autocomplete has a value Closes #136 --- src/angular/directive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/angular/directive.js b/src/angular/directive.js index 21cee165b..d2a15a8f5 100644 --- a/src/angular/directive.js +++ b/src/angular/directive.js @@ -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) {