27 lines
620 B
JavaScript
27 lines
620 B
JavaScript
import ngModule from '../module';
|
|
|
|
export default class Controller {
|
|
constructor($scope, $state) {
|
|
this.$scope = $scope;
|
|
this.$state = $state;
|
|
this.zone = {
|
|
travelingDays: 0,
|
|
price: 0.50,
|
|
bonus: 0.50,
|
|
hour: new Date()
|
|
};
|
|
}
|
|
|
|
onSubmit() {
|
|
this.$scope.watcher.submit().then(res => {
|
|
this.$state.go('zone.card.location', {id: res.data.id});
|
|
});
|
|
}
|
|
}
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
ngModule.component('vnZoneCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|