salix/modules/claim/front/development/index.js

28 lines
561 B
JavaScript

import ngModule from '../module';
import './style.scss';
class Controller {
constructor($state, $scope) {
this.$state = $state;
this.$ = $scope;
}
onSubmit() {
this.$.watcher.check();
this.$.model.save().then(() => {
this.$.watcher.notifySaved();
this.$.model.refresh();
});
}
}
Controller.$inject = ['$state', '$scope'];
ngModule.component('vnClaimDevelopment', {
template: require('./index.html'),
controller: Controller,
bindings: {
claim: '<'
}
});