21 lines
513 B
JavaScript
21 lines
513 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.basicData', {id: res.data.id})
|
|
);
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnTravelCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|