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