21 lines
469 B
JavaScript
21 lines
469 B
JavaScript
import ngModule from '../../module';
|
|
import Component from '../../lib/component';
|
|
import './style.scss';
|
|
|
|
export default class Chip extends Component {
|
|
onRemove() {
|
|
if (!this.disabled) this.emit('remove');
|
|
}
|
|
}
|
|
Chip.$inject = ['$element', '$scope', '$transclude'];
|
|
|
|
ngModule.component('vnChip', {
|
|
template: require('./index.html'),
|
|
controller: Chip,
|
|
transclude: true,
|
|
bindings: {
|
|
disabled: '<?',
|
|
removable: '<?'
|
|
}
|
|
});
|