salix/front/core/components/chip/index.js

21 lines
471 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.vnComponent('vnChip', {
template: require('./index.html'),
controller: Chip,
transclude: true,
bindings: {
disabled: '<?',
removable: '<?'
}
});