21 lines
509 B
JavaScript
21 lines
509 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
$onChanges() {
|
|
if (this.$params && this.$params.q)
|
|
this.travel = JSON.parse(this.$params.q);
|
|
}
|
|
|
|
onSubmit() {
|
|
return this.$.watcher.submit().then(
|
|
res => this.$state.go('travel.card.summary', {id: res.data.id})
|
|
);
|
|
}
|
|
}
|
|
|
|
ngModule.component('vnTravelCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|