31 lines
713 B
JavaScript
31 lines
713 B
JavaScript
|
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: '<'
|
||
|
}
|
||
|
});
|