24 lines
553 B
JavaScript
24 lines
553 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('vnItemNiche', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|