From 22c786039bc796d3b9744e2b5ce893baea998409 Mon Sep 17 00:00:00 2001 From: amir Date: Fri, 25 Nov 2016 18:53:10 +0200 Subject: [PATCH] Added a disable input option, based on ng-disabled. --- script/autocomplete.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/script/autocomplete.js b/script/autocomplete.js index e755ea8..39c725b 100644 --- a/script/autocomplete.js +++ b/script/autocomplete.js @@ -13,7 +13,8 @@ app.directive('autocomplete', function() { onType: '=onType', onSelect: '=onSelect', autocompleteRequired: '=', - noAutoSort: '=noAutoSort' + noAutoSort: '=noAutoSort', + disableInput: '=' }, controller: ['$scope', function($scope){ // the index of the suggestions that's currently selected @@ -252,8 +253,9 @@ app.directive('autocomplete', function() { tabindex="{{ attrs.tabindex }}"\ id="{{ attrs.inputid }}"\ name="{{ attrs.name }}"\ - ng-required="{{ autocompleteRequired }}" />\ -