salix/client/ticket/src/data/data.js

33 lines
584 B
JavaScript
Raw Normal View History

2018-04-10 05:48:04 +00:00
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
});