import ngModule from '../module';

class Controller {
    constructor($scope) {
        this.$ = $scope;
    }

    onSubmit() {
        return this.$.watcher.submit().then(() => {
            this.card.reload();
        });
    }
}
Controller.$inject = ['$scope'];

ngModule.component('vnTravelBasicData', {
    template: require('./index.html'),
    controller: Controller,
    bindings: {
        travel: '<'
    },
    require: {
        card: '^vnTravelCard'
    }
});