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);
|
2018-11-16 12:43:24 +00:00
|
|
|
this.$element = $element;
|
|
|
|
this.input = $element[0].querySelector('input');
|
|
|
|
}
|
|
|
|
|
|
|
|
set disabled(value) {
|
|
|
|
this.input.disabled = value;
|
|
|
|
}
|
2018-02-10 15:18:01 +00:00
|
|
|
}
|
2018-11-16 12:43:24 +00:00
|
|
|
|
2019-06-20 11:50:58 +00:00
|
|
|
Controller.$inject = ['$element', '$scope'];
|
2018-11-16 12:43:24 +00:00
|
|
|
|
|
|
|
ngModule.component('vnSubmit', {
|
|
|
|
template: require('./submit.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
label: '@?',
|
|
|
|
disabled: '<?',
|
|
|
|
}
|
|
|
|
});
|