salix/client/claim/src/development/index.js

31 lines
713 B
JavaScript
Raw Normal View History

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