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 });