import ngModule from '../module'; import Component from 'core/lib/component'; import './style.scss'; class Controller extends Component { addStowaway(stowaway) { let params = {id: stowaway.id, shipFk: this.ticket.id}; this.$http.post(`Stowaways/`, params) .then(() => { this.cardReload(); this.vnApp.showSuccess(this.$translate.instant('Data saved!')); this.$.dialog.hide(); }); } show() { this.$.dialog.show(); } hide() { this.$.dialog.hide(); } } ngModule.component('vnAddStowaway', { template: require('./addStowaway.html'), controller: Controller, bindings: { ticket: '<', cardReload: '&?' } });