import ngModule from '../module'; import Summary from 'salix/components/summary'; import './style.scss'; class Controller extends Summary { set invoiceOut(value) { this._invoiceOut = value; if (value && value.id) this.getSummary(); } get invoiceOut() { return this._invoiceOut; } getSummary() { return this.$http.get(`InvoiceOuts/${this.invoiceOut.id}/summary`) .then(res => this.summary = res.data); } } ngModule.vnComponent('vnInvoiceOutSummary', { template: require('./index.html'), controller: Controller, bindings: { invoiceOut: '<' } });