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("ticket.card.summary", {id: newOrderID}); } } Controller.$inject = ['$scope', '$http', '$state']; ngModule.component('vnTicketCreate', { template: require('./index.html'), controller: Controller });