を割り当てる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>