salix/client/ticket/src/tracking/edit/edit.js

26 lines
593 B
JavaScript
Raw Normal View History

2018-03-27 12:26:20 +00:00
import ngModule from '../../module';
export default class Controller {
constructor($scope, $state) {
this.$ = $scope;
this.$state = $state;
this.ticket = {
ticketFk: $state.params.id,
text: null
};
}
onSubmit() {
this.$.watcher.submit().then(
() => {
this.$state.go('ticket.card.tracking.index');
}
);
}
}
Controller.$inject = ['$scope', '$state'];
ngModule.component('vnTicketTrackingEdit', {
template: require('./edit.html'),
controller: Controller
});