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

26 lines
580 B
JavaScript
Raw Normal View History

2018-11-21 07:58:34 +00:00
import ngModule from '../../module';
import './style.scss';
class Controller {
constructor($state, $scope) {
this.$ = $scope;
this.$state = $state;
this.ticketRequest = {
ticketFk: $state.params.id
};
}
onSubmit() {
this.$.watcher.submit().then(
2018-11-21 11:17:11 +00:00
json => this.$state.go('ticket.card.request.index', {id: $state.params.id})
2018-11-21 07:58:34 +00:00
);
}
}
Controller.$inject = ['$state', '$scope'];
ngModule.component('vnTicketRequestCreate', {
template: require('./index.html'),
controller: Controller
});