salix/modules/ticket/front/note/index.js

27 lines
589 B
JavaScript

import ngModule from '../module';
class Controller {
constructor($stateParams, $scope) {
this.$stateParams = $stateParams;
this.$scope = $scope;
}
onSubmit() {
this.$scope.watcher.check();
this.$scope.model.save().then(() => {
this.$scope.watcher.notifySaved();
this.$scope.model.refresh();
});
}
}
Controller.$inject = ['$stateParams', '$scope'];
ngModule.component('vnTicketObservation', {
template: require('./index.html'),
controller: Controller,
bindings: {
ticket: '<'
}
});