import ngModule from '../module'; import Summary from 'salix/components/summary'; import './style.scss'; class Controller extends Summary { getSummary() { this.$http.get(`Items/${this.item.id}/getSummary`).then(response => { this.summary = response.data; }); } $onChanges() { if (this.item && this.item.id) this.getSummary(); } } ngModule.vnComponent('vnItemSummary', { template: require('./index.html'), controller: Controller, bindings: { item: '<', }, });