salix/client/client/src/greuge-create/greuge-create.js

24 lines
586 B
JavaScript
Raw Normal View History

2017-12-04 07:17:29 +00:00
import ngModule from '../module';
class ClientGreugeCreate {
constructor($scope, $state) {
this.$ = $scope;
this.$state = $state;
this.greuge = {};
}
onSubmit() {
this.greuge.clientFk = this.$state.params.id;
this.$.watcher.submit().then(
() => {
this.$state.go('clientCard.greuge.list');
}
);
}
}
ClientGreugeCreate.$inject = ['$scope', '$state'];
ngModule.component('vnClientGreugeCreate', {
template: require('./greuge-create.html'),
controller: ClientGreugeCreate
});