37 lines
646 B
JavaScript
37 lines
646 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() {
|
|
return this.child.onStepChange();
|
|
}
|
|
|
|
onSubmit() {
|
|
this.child.onSubmit();
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
ngModule.component('vnTicketBasicData', {
|
|
template: require('./index.html'),
|
|
bindings: {
|
|
ticket: '<'
|
|
},
|
|
controller: Controller
|
|
});
|