From a0ccdedede543adbe7cfeb960a104d800f575f92 Mon Sep 17 00:00:00 2001 From: Hilal Rizek Date: Tue, 19 Sep 2017 12:13:15 +0300 Subject: [PATCH] added support for maxlength attribute, attr-maxlength, for the input field --- script/autocomplete.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/autocomplete.js b/script/autocomplete.js index e755ea8..2e12c68 100644 --- a/script/autocomplete.js +++ b/script/autocomplete.js @@ -113,7 +113,8 @@ app.directive('autocomplete', function() { "class": "", "id": "", "inputclass": "", - "inputid": "" + "inputid": "", + "maxlength": "" }; for (var a in attrs) { @@ -251,6 +252,7 @@ app.directive('autocomplete', function() { class="{{ attrs.inputclass }}"\ tabindex="{{ attrs.tabindex }}"\ id="{{ attrs.inputid }}"\ + maxlength="{{ attrs.maxlength }}"\ name="{{ attrs.name }}"\ ng-required="{{ autocompleteRequired }}" />\