2018-03-14 10:41:19 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
2018-05-25 08:03:45 +00:00
|
|
|
class Controller {
|
2018-07-09 11:54:43 +00:00
|
|
|
constructor($scope, $http, $state) {
|
2018-03-14 10:41:19 +00:00
|
|
|
this.$ = $scope;
|
2018-07-09 11:54:43 +00:00
|
|
|
this.$http = $http;
|
2018-03-14 10:41:19 +00:00
|
|
|
this.$state = $state;
|
|
|
|
}
|
|
|
|
|
2018-07-09 11:54:43 +00:00
|
|
|
async onSubmit() {
|
|
|
|
let newOrderID = await this.$.card.createOrder();
|
|
|
|
this.$state.go("ticket.card.summary", {id: newOrderID});
|
2018-03-14 10:41:19 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-09 11:54:43 +00:00
|
|
|
Controller.$inject = ['$scope', '$http', '$state'];
|
2018-03-14 10:41:19 +00:00
|
|
|
|
|
|
|
ngModule.component('vnTicketCreate', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
2018-03-14 10:41:19 +00:00
|
|
|
});
|