Ng-tags-input, how to disable user input?

I am looking for how to disable user input for this directive directive, I want the controller to insert values ​​into certain events that occur in the view.

I went through the API and I really did not find how to do this. I even tried using the attributedisabled

<tags-input ng-model="filterTags" disabled></tags-input>

It so happened that the style turned gray, but I could still manually insert the values.

+4
source share
2 answers

check it please

<input ng-disabled="true">
+4
source

In ng-tags-input.min.js


  • Delete Close / delete tag symbol:
    a) Search ng-click="$removeTag()" ng-bind="::$$removeTagSymbol"
    b) Delete these attributes

  • :
    a) <input class="input"
    b) readonly

  • " ":
     a) Add a tag, - placeholder:[String,"Add a tag"]
     ) , - placeholder:[String,""]

+1

Source: https://habr.com/ru/post/1622070/


All Articles