salix/modules/client/front/create/index.js

23 lines
531 B
JavaScript
Raw Normal View History

2017-06-03 11:01:47 +00:00
import ngModule from '../module';
2017-06-03 11:01:47 +00:00
export default class Controller {
2017-03-07 16:11:56 +00:00
constructor($scope, $state) {
2017-06-03 11:01:47 +00:00
this.$ = $scope;
this.$state = $state;
this.client = {
active: true
};
}
onSubmit() {
2017-06-03 11:01:47 +00:00
this.$.watcher.submit().then(
2018-05-23 12:26:51 +00:00
json => this.$state.go('client.card.basicData', {id: json.data.id})
);
}
}
2017-03-07 16:11:56 +00:00
Controller.$inject = ['$scope', '$state'];
2017-06-03 11:01:47 +00:00
ngModule.component('vnClientCreate', {
2018-05-23 12:26:51 +00:00
template: require('./index.html'),
controller: Controller
2017-06-03 11:01:47 +00:00
});