salix/client/ticket/src/create/index.js

23 lines
479 B
JavaScript
Raw Normal View History

2018-03-14 10:41:19 +00:00
import ngModule from '../module';
class Controller {
2018-03-14 10:41:19 +00:00
constructor($scope, $state) {
this.$ = $scope;
this.$state = $state;
this.Ticket = {};
}
onSubmit() {
this.$.watcher.submit().then(
json => this.$state.go('ticket.card.data', {id: json.data.id})
);
}
}
Controller.$inject = ['$scope', '$state'];
2018-03-14 10:41:19 +00:00
ngModule.component('vnTicketCreate', {
template: require('./index.html'),
controller: Controller
2018-03-14 10:41:19 +00:00
});