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

16 lines
391 B
JavaScript
Raw Normal View History

2019-03-22 15:47:20 +00:00
import ngModule from '../module';
2020-03-17 14:24:55 +00:00
import Section from 'salix/components/section';
2019-03-22 15:47:20 +00:00
2020-03-17 14:24:55 +00:00
export default class Controller extends Section {
2019-03-22 15:47:20 +00:00
onSubmit() {
2020-03-17 14:24:55 +00:00
this.$.watcher.submit().then(
2019-03-22 15:47:20 +00:00
res => this.$state.go('route.card.summary', {id: res.data.id})
);
}
}
ngModule.component('vnRouteCreate', {
template: require('./index.html'),
controller: Controller
});