23 lines
531 B
JavaScript
23 lines
531 B
JavaScript
import ngModule from '../module';
|
|
|
|
export default class Controller {
|
|
constructor($scope, $state) {
|
|
this.$ = $scope;
|
|
this.$state = $state;
|
|
this.client = {
|
|
active: true
|
|
};
|
|
}
|
|
onSubmit() {
|
|
this.$.watcher.submit().then(
|
|
json => this.$state.go('client.card.basicData', {id: json.data.id})
|
|
);
|
|
}
|
|
}
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
ngModule.component('vnClientCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|