salix/front/core/components/submit/submit.js

24 lines
478 B
JavaScript
Raw Normal View History

2018-02-10 15:18:01 +00:00
import ngModule from '../../module';
export default class Controller {
constructor($element) {
this.$element = $element;
this.input = $element[0].querySelector('input');
}
set disabled(value) {
this.input.disabled = value;
}
2018-02-10 15:18:01 +00:00
}
Controller.$inject = ['$element'];
ngModule.component('vnSubmit', {
template: require('./submit.html'),
controller: Controller,
bindings: {
label: '@?',
disabled: '<?',
}
});