2018-09-04 09:49:00 +00:00
|
|
|
import ngModule from '../../module';
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
export default class Chip {
|
2018-09-07 10:20:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove chip event
|
|
|
|
*/
|
|
|
|
remove() {
|
|
|
|
if (this.onRemove)
|
|
|
|
this.onRemove();
|
2018-09-04 09:49:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Chip.$inject = ['$element', '$scope', '$transclude'];
|
|
|
|
|
|
|
|
ngModule.component('vnChip', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Chip,
|
|
|
|
transclude: true,
|
|
|
|
bindings: {
|
2018-09-07 10:20:57 +00:00
|
|
|
disabled: '<?',
|
|
|
|
onRemove: '&?'
|
2018-09-04 09:49:00 +00:00
|
|
|
}
|
|
|
|
});
|