2018-02-10 15:18:01 +00:00
|
|
|
import ngModule from '../../module';
|
|
|
|
|
2018-11-16 12:43:24 +00:00
|
|
|
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
|
|
|
}
|
2018-11-16 12:43:24 +00:00
|
|
|
|
|
|
|
Controller.$inject = ['$element'];
|
|
|
|
|
|
|
|
ngModule.component('vnSubmit', {
|
|
|
|
template: require('./submit.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
label: '@?',
|
|
|
|
disabled: '<?',
|
|
|
|
}
|
|
|
|
});
|