Search code examples
angularjs-directiveng-tags-input

ng-tags-input on-tag-click handler: is there a better way?


update 2015.06.01

This issue was resolved within the library - https://github.com/mbenford/ngTagsInput/pull/239

problem

There is no on-tag-click handler for the ng-tags-input such that a user clicks on a tag to elicit a function call via an angular expression:

<!-- does not exist -->
<tags-input on-tag-click="handleTagClick(data)"></tags-input>

Solution

  • best solution (May 2015)

    As of mid-May 2015, this issue was resolved within the library https://github.com/mbenford/ngTagsInput/pull/239. Now you can use it with the directive like so:

    <tags-input on-tag-clicked="callback()"