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

28 lines
561 B
JavaScript
Raw Normal View History

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