salix/client/claim/src/summary/index.js

29 lines
569 B
JavaScript
Raw Normal View History

2018-09-05 11:47:15 +00:00
import ngModule from '../module';
class Controller {
constructor($http) {
this.$http = $http;
}
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();
}
}
Controller.$inject = ['$http'];
ngModule.component('vnClaimSummary', {
template: require('./index.html'),
controller: Controller,
bindings: {
claim: '<'
}
});