角材料md-contact-chips回调问题
问题描述:
我正面临着一些关于角材料md-contact-chips的问题。角材料md-contact-chips回调问题
如何做'返回信息'和'回拨删除btn'像md芯片自动完成。因为我无法使用'md-on-append'和'md-on-remove'。
- 我想点击自动完成记录的结果,然后控制我点击的结果。
- 我想单击联系人芯片中的删除btn,然后控制芯片数据。
这是我的基本官方代码。
<md-contact-chips ng-model="dialogContentCtrl.contacts"
md-contacts="dialogContentCtrl.querySearch($query)"
md-contact-name="name"
md-contact-image="image"
md-require-match="true"
placeholder="Add Tag..."
secondary-placeholder="Add Tag...">
</md-contact-chips>
答
观察数据变化的唯一方法是使用$ watch或$ watchCollection。 我为这个组件使用了$ watchCollection。