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