import ngModule from '../module'; import './style.scss'; import Component from 'core/lib/component'; class Controller extends Component { constructor($element, $, $httpParamSerializer) { super($element, $); this.$httpParamSerializer = $httpParamSerializer; } get entry() { return this._entry; } set entry(value) { this._entry = value; if (value && value.id) this.getEntry(); } getEntry() { return this.$http.get(`/api/Entries/${this.entry.id}/getEntry`).then(response => { this.entryData = response.data; }); } } Controller.$inject = ['$element', '$scope', '$httpParamSerializer']; ngModule.component('vnEntrySummary', { template: require('./index.html'), controller: Controller, bindings: { entry: '<' } });