37 lines
651 B
JavaScript
37 lines
651 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($scope, $state) {
|
|
this.$scope = $scope;
|
|
this.$state = $state;
|
|
}
|
|
|
|
set ticket(data) {
|
|
if (!data) return;
|
|
|
|
this.data = Object.assign({}, data);
|
|
}
|
|
|
|
registerChild(child) {
|
|
this.child = child;
|
|
}
|
|
|
|
onStepChange(state) {
|
|
return this.child.onStepChange(state);
|
|
}
|
|
|
|
onSubmit() {
|
|
this.child.onSubmit();
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
ngModule.component('vnTicketData', {
|
|
template: require('./index.html'),
|
|
bindings: {
|
|
ticket: '<'
|
|
},
|
|
controller: Controller
|
|
});
|