当我尝试添加重复的芯片时,该组件会自动删除新添加的芯片,因为它不允许添加重复的芯片。
我需要触发一个事件,我可以依靠该事件查看用户无法添加重复筹码的验证消息
<div ng-controller="BasicDemoCtrl as ctrl" layout="column"
ng-cloak="" class="chipsdemoBasicUsage" ng-app="MyApp">
<md-content class="md-padding" layout="column">
<h2 class="md-title">Make chips editable.</h2>
<md-chips ng-model="ctrl.editableFruitNames" readonly="ctrl.readonly"
md-removable="ctrl.removable" md-enable-chip-edit="true"
input-aria-label="Fruit names">
</md-chips>
<em ng-if="if chips duplicated(the condition which I need)">You have
added a duplicated chip</em>
尝试添加重复的芯片..重复的芯片将被自动删除,而没有任何验证消息https://codepen.io/aRagabCs/pen/OYXwEx