material
material copied to clipboard
Add Chips component
Specification: Chips

<material-chips>
<material-chip ng-repeat="contact in contacts" active="contact.selected">
<img ng-src="{{contact.img}}">
<h2>{{contact.name}}</h2>
<p>{{contact.email}}</p>
</material-chip>
</material-chips>
Considerations:
- All chips inside are available in the menu.
- All chips that evaluate to
activetrue will be rendered.
what about the action for the x?
There would be two solutions I can think of:
- Allow devs to use whatever icon they want for the action on the right if so then this could work
<material-chips>
<material-chip ng-repeat="contact in contacts" active="contact.selected">
<img ng-src="{{contact.img}}">
<h2>{{contact.name}}</h2>
<p>{{contact.email}}</p>
<md-icon class="md-chip-action" md-svg-icon="icon" ng-click="action($index)"><md-icon>
</material-chip>
</material-chips>
- place an action directive on the
material-chipdirective
<material-chips>
<material-chip ng-repeat="contact in contacts" active="contact.selected"
material-chip-action="action($index)">
<img ng-src="{{contact.img}}">
<h2>{{contact.name}}</h2>
<p>{{contact.email}}</p>
</material-chip>
</material-chips>
What do you think @ajoslin ?
when you delete a item its not the item that is deleted.
example: Basic usage when you click delete[X] on (fruit:orange). (fruit: apple) got deleted
Along the same lines (not making a new issue since this one is still open): If you re-enter an existing chip, all further chips entered after it will not show up until that chip is deleted.
- add 'foo' (this works)
- add 'foo' again (nothing happens)
- add a few other chips (nothing happens)
- delete 'foo': The second 'foo' as well as all other new chips appear.
nice works like a charm !