salix/modules/item/front/niche/index.js

24 lines
553 B
JavaScript
Raw Normal View History

import ngModule from '../module';
2018-02-20 11:25:51 +00:00
export default class Controller {
constructor($stateParams, $scope) {
this.$stateParams = $stateParams;
2018-02-20 11:25:51 +00:00
this.$scope = $scope;
}
onSubmit() {
this.$scope.watcher.check();
this.$scope.model.save().then(() => {
this.$scope.watcher.notifySaved();
this.$scope.model.refresh();
});
}
2018-02-20 11:25:51 +00:00
}
Controller.$inject = ['$stateParams', '$scope'];
2018-02-20 11:25:51 +00:00
ngModule.component('vnItemNiche', {
template: require('./index.html'),
2018-02-20 11:25:51 +00:00
controller: Controller
});