import ngModule from '../module'; import './style.scss'; import Summary from 'salix/components/summary'; class Controller extends Summary { get entry() { return this._entry; } set entry(value) { this._entry = value; if (value && value.id) { this.getEntryData(); this.getBuys(); } } getEntryData() { return this.$http.get(`Entries/${this.entry.id}/getEntry`).then(response => { this.entryData = response.data; }); } getBuys() { return this.$http.get(`Entries/${this.entry.id}/getBuys`).then(response => { this.buys = response.data; }); } } ngModule.vnComponent('vnEntrySummary', { template: require('./index.html'), controller: Controller, bindings: { entry: '<' } });