29 lines
565 B
JavaScript
29 lines
565 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($scope, $state) {
|
|
this.$scope = $scope;
|
|
this.$state = $state;
|
|
}
|
|
|
|
onSubmit() {
|
|
this.$scope.watcher.submit().then(() => {
|
|
this.$state.go('zone.card.location');
|
|
this.card.reload();
|
|
});
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
ngModule.component('vnZoneEdit', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
zone: '<'
|
|
},
|
|
require: {
|
|
card: '^vnZoneCard'
|
|
}
|
|
});
|