33 lines
584 B
JavaScript
33 lines
584 B
JavaScript
|
import ngModule from '../module';
|
||
|
|
||
|
class Controller {
|
||
|
constructor($scope, $state) {
|
||
|
this.$scope = $scope;
|
||
|
this.$state = $state;
|
||
|
}
|
||
|
|
||
|
set ticket(data) {
|
||
|
this.data = Object.assign({}, data);
|
||
|
}
|
||
|
|
||
|
onSubmit() {
|
||
|
//post data
|
||
|
alert('Data saved');
|
||
|
console.log(this.data);
|
||
|
}
|
||
|
|
||
|
onStepChange(state) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Controller.$inject = ['$scope', '$state'];
|
||
|
|
||
|
ngModule.component('vnTicketData', {
|
||
|
template: require('./data.html'),
|
||
|
bindings: {
|
||
|
ticket: '<'
|
||
|
},
|
||
|
controller: Controller
|
||
|
});
|