import ngModule from '../module'; export default class Controller { constructor($scope, $state) { this.$scope = $scope; this.$state = $state; this.zone = { travelingDays: 0, price: 0.50, bonus: 0.50, hour: new Date() }; } onSubmit() { this.$scope.watcher.submit().then(res => { this.$state.go('zone.card.basicData', {id: res.data.id}); }); } } Controller.$inject = ['$scope', '$state']; ngModule.component('vnZoneCreate', { template: require('./index.html'), controller: Controller });