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

21 lines
476 B
JavaScript
Raw Normal View History

2019-03-22 15:47:20 +00:00
import ngModule from '../module';
export default class Controller {
constructor($scope, $state) {
this.$scope = $scope;
this.$state = $state;
}
onSubmit() {
this.$scope.watcher.submit().then(
res => this.$state.go('route.card.summary', {id: res.data.id})
);
}
}
Controller.$inject = ['$scope', '$state'];
ngModule.component('vnRouteCreate', {
template: require('./index.html'),
controller: Controller
});