import ngModule from '../module'; import Section from 'salix/components/section'; import './style.scss'; class Controller extends Section { 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.component('vnItemSummary', { template: require('./index.html'), controller: Controller, bindings: { item: '<', }, });