21 lines
499 B
JavaScript
21 lines
499 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($scope, $http, $state) {
|
|
this.$ = $scope;
|
|
this.$http = $http;
|
|
this.$state = $state;
|
|
}
|
|
|
|
async onSubmit() {
|
|
let newOrderID = await this.$.card.createOrder();
|
|
this.$state.go('order.card.summary', {id: newOrderID});
|
|
}
|
|
}
|
|
Controller.$inject = ['$scope', '$http', '$state'];
|
|
|
|
ngModule.component('vnOrderCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|