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

26 lines
580 B
JavaScript
Raw Normal View History

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