import ngModule from '../module'; class Controller { constructor($http, $scope) { this.$http = $http; this.$ = $scope; } getSummary() { this.$http.get(`/claim/api/Claims/${this.claim.id}/getSummary`).then(response => { this.summary = response.data; }); } $onChanges() { if (this.claim && this.claim.id) this.getSummary(); } // Item Descriptor showDescriptor(event, itemFk) { this.quicklinks = { btnThree: { icon: 'icon-transaction', state: `item.card.diary({ id: ${itemFk} })`, tooltip: 'Item diary' } }; this.$.descriptor.itemFk = itemFk; this.$.descriptor.parent = event.target; this.$.descriptor.show(); } } Controller.$inject = ['$http', '$scope']; ngModule.component('vnClaimSummary', { template: require('./index.html'), controller: Controller, bindings: { claim: '<' } });