24 lines
555 B
JavaScript
24 lines
555 B
JavaScript
import ngModule from '../module';
|
|
|
|
export default 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('vnItemBarcode', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|