26 lines
441 B
JavaScript
26 lines
441 B
JavaScript
import ngModule from '../../module';
|
|
import './style.scss';
|
|
|
|
export default class Chip {
|
|
|
|
/**
|
|
* Remove chip event
|
|
*/
|
|
remove() {
|
|
if (this.onRemove)
|
|
this.onRemove();
|
|
}
|
|
}
|
|
|
|
Chip.$inject = ['$element', '$scope', '$transclude'];
|
|
|
|
ngModule.component('vnChip', {
|
|
template: require('./index.html'),
|
|
controller: Chip,
|
|
transclude: true,
|
|
bindings: {
|
|
disabled: '<?',
|
|
onRemove: '&?'
|
|
}
|
|
});
|