如果我分配max-tags="1"
,它工作得很好,但是当我尝试max-tags="maxtag()"
通过链接功能使用动态分配时,它显示输入框的红色边框。从视图来看,我正在尝试放置最大数量的标签。一切正常,但输入框为红色,显示如下文本图像。比如警告。如何修复它。
工作演示
http://plnkr.co/edit/ooTucE4yqmLwMH9kNkO7?p=preview
<tags-input ng-model="modeldisplay" class="input-md" display-
property="data" on-tag-removed="removedCustomerTag()"
placeholder="Select a User" on-tag-adding="addSearchedTag()" on-tag-added="tagAdded($tag)"
enable-editing-last-tag="removedCustomerTag()" replace-spaces-with-dashes="false" max-tags="maxtag()"
add-from-autocomplete-only="true">
<auto-complete source="loadTags($query)" min-length="1" load-on-focus="true" load-on-empty="true"
max-results-to-show="10" template="autocomplete.html">
</auto-complete>
</tags-input>