ng-tags-input

ngTagInput : Dynamic coloring tags and resizable input box

大兔子大兔子 提交于 2019-12-25 09:23:48
问题 Is there any way, I can color a tag(with different colors) on on-tag-adding event, for a tag entered by user which is not a part of suggestion list? i.e. as a warning to user that he is going to add unknown tag(in red?) also, How Can I make input box re-sizable vertically as we add more and more tags? 来源: https://stackoverflow.com/questions/38645139/ngtaginput-dynamic-coloring-tags-and-resizable-input-box

AngularJS: Why is my directive's link function not being called?

三世轮回 提交于 2019-12-25 03:44:10
问题 I am using ngTagsInput and would like to perform some validation on my models as they change. Here is a Plunker of what I'd like to achieve. Markup: <div ng-repeat="field in fields"> <tags-input ng-model="field.selectedData" max-tags="{{field.maxTags}}" enforce-max-tags placeholder="{{option.placeholder}}"> <auto-complete source="updateAutocomplete($query)"></auto-complete> </tags-input> </div> Fields / models: $scope.fields = [ { name: 'assay', placeholder: 'Select one assay...', maxTags: 1,

AngularJS: Why is my directive's link function not being called?

喜夏-厌秋 提交于 2019-12-25 03:44:04
问题 I am using ngTagsInput and would like to perform some validation on my models as they change. Here is a Plunker of what I'd like to achieve. Markup: <div ng-repeat="field in fields"> <tags-input ng-model="field.selectedData" max-tags="{{field.maxTags}}" enforce-max-tags placeholder="{{option.placeholder}}"> <auto-complete source="updateAutocomplete($query)"></auto-complete> </tags-input> </div> Fields / models: $scope.fields = [ { name: 'assay', placeholder: 'Select one assay...', maxTags: 1,

ng-tags-input with allowed-tags-pattern option doesn't work

*爱你&永不变心* 提交于 2019-12-23 01:42:21
问题 I want tagname to only be in Upper case, Lower Case, Number, Characters: +_- and defined the tag-input as below with allowed-tags-pattern="[A-Za-z0-9+_-]+" My try: <tags-input ng-model="selectedTags" display-property="name" add-on-space="true" allowed-tags-pattern="[A-Za-z0-9+_-]+" on-invalid-tag="invalidTagInput($tag)" on-tag-adding="addingTag($tag)" placeholder="{{'TAGS.SELECT' | translate}}"> <auto-complete source="loadTags($query)" min-length="0" load-on-focus="true" load-on-empty="true"

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

拈花ヽ惹草 提交于 2019-12-14 03:47:03
问题 I'm looking for how to the disable user input for this directive directive, what I want to do is the controller to insert values on certain events happening in the view. I've went through the API and I didn't really find how to do this. I've even tried using the disabled attribute <tags-input ng-model="filterTags" disabled></tags-input> What happened was the style turned gray, but I could still manually insert values. 回答1: check this please, <input ng-disabled="true"> 回答2: In ng-tags-input

How to add disabled attribute to input tag with ngTagsInput?

那年仲夏 提交于 2019-12-13 01:50:20
问题 I have a custom directive that I use to manage user access through my website. I use this to add a 'disabled="disabled"' attribute to html tags. However, when I try to use this with tag-input, it doesn't work. I'm guess this is down to that fact that ngTagsInput uses it's own directive for tags-input. I have read the documentation and cannot find a solution to what I am looking for. Here is my code: Html: <div access-level="Admin"> <tags-input ng-model="tags" on-tag-added="addNewTag($tag)" on

Error using ngTagInput : TypeError: a.filter is not a function

£可爱£侵袭症+ 提交于 2019-12-11 05:47:41
问题 I am trying to use ngTagInput with autocomplete but getting following Error: angular.min.js:117 TypeError: a.filter is not a function at d (ng-tags-input.min.js:1) at ng-tags-input.min.js:1 at angular.min.js:130 at n.$eval (angular.min.js:144) at n.$digest (angular.min.js:142) at n.$apply (angular.min.js:145) at l (angular.min.js:97) at H (angular.min.js:101) at XMLHttpRequest.u.onload (angular.min.js:102) HTML <tags-input ng-model="selectedList"> <auto-complete source="getData($query)"><

How to set coloring of tags in ngTagsInput?

有些话、适合烂在心里 提交于 2019-12-10 18:39:18
问题 I want to use ng-tags-input in my project. I try to set diffrent color for each tag according to color property object in array. Here is plunker I am working on. For this purpose I need to override tag-item css class in ng-input template. Here is the example of ng-input template: <script type="text/ng-template" id="tag-template"> <div class="tags-input" ng-style="{background: data.color}"> <span>{{$getDisplayText()}}</span> <a class="remove-button" ng-click="$removeTag()">✖</a> </div> in this

Filter ngtagsinput in AngularJS

送分小仙女□ 提交于 2019-12-08 13:18:42
问题 I have some trouble with filtering JSON data by tags with AngularJS. I tried this slightly modified filter by ExpertSystem (Apply dynamic filters using Tags) here: groupifyApp.filter('filterByTags', function () { return function (items, tags) { var filtered = []; if (tags.length == 0) { filtered = items; } (items || []).forEach(function (item) { var matches = tags.some(function (tag) { return (item.data1.indexOf(tag.text) > -1) || (item.data2.indexOf(tag.text) > -1); }); if (matches) {