简体   繁体   中英

Angular Material md-contact-chips callback issue

i am facing some problems about Angular Material md-contact-chips.

How to do 'Return a message' and 'Callback with Remove btn' like md-chip auto-complete. Because i can't use the 'md-on-append' and 'md-on-remove'.

  1. I want to click a result by auto-completed records, then console my clicked result.
  2. I want to click the remove btn inside the contact-chip, then console the chip data.

It's my basic offical code.

<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>

The only way to watch data change is with $watch or $watchCollection. I'm using the $watchCollection for this component.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM