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

21 lines
471 B
JavaScript
Raw Normal View History

2018-09-04 09:49:00 +00:00
import ngModule from '../../module';
2019-10-18 19:36:30 +00:00
import Component from '../../lib/component';
2018-09-04 09:49:00 +00:00
import './style.scss';
2019-10-18 19:36:30 +00:00
export default class Chip extends Component {
onRemove() {
if (!this.disabled) this.emit('remove');
2018-09-04 09:49:00 +00:00
}
}
Chip.$inject = ['$element', '$scope', '$transclude'];
ngModule.vnComponent('vnChip', {
2018-09-04 09:49:00 +00:00
template: require('./index.html'),
controller: Chip,
transclude: true,
bindings: {
2018-09-07 10:20:57 +00:00
disabled: '<?',
2019-10-18 19:36:30 +00:00
removable: '<?'
2018-09-04 09:49:00 +00:00
}
});