import ngModule from '../../module'; import Section from 'salix/components/section'; class Controller extends Section { constructor($element, $) { super($element, $); this.greuge = { shipped: new Date(), clientFk: this.$params.id }; } cancel() { this.goToIndex(); } goToIndex() { this.$state.go('client.card.greuge.index'); } onSubmit() { this.$.watcher.submit().then( () => { this.goToIndex(); } ); } } Controller.$inject = ['$element', '$scope']; ngModule.vnComponent('vnClientGreugeCreate', { template: require('./index.html'), controller: Controller });