When the component received the output from the API it failed to parse as it was expecting a completely different structure. I was able to get it to work but had to actually rewrite the parsing code:
Original Code:
Code: Select all
ControllerService.prototype.loadViewer = function () {
var _this = this;
var url = this.model.requestUrl.replace('{action}', this.model.action);
this.httpClient.post(url, this.model.createPostParameters({ action: 'AngularViewerData' }, true, false), 'json').subscribe(function (data) {
_this.model.clear();
_this.stylesService.setupStyle(atob(data['styles']), 'viewer');
_this.model.options = data;
_this.checkTrExp();
_this.initAutoUpdateCache();
_this.subject.next({ action: 'viewer_loaded' });
_this.getReport();
});
};
Code: Select all
ControllerService.prototype.loadViewer = function () {
var _this = this;
var url = this.model.requestUrl.replace('{action}', this.model.action);
this.httpClient.post(url, this.model.createPostParameters({ action: 'AngularViewerData' }, true, false), 'json').subscribe(function (data) {
_this.model.clear();
var dataObject = JSON.parse(atob(data['Data']));
var styles = dataObject['styles'];
_this.stylesService.setupStyle(atob(styles), 'viewer');
_this.model.options = dataObject;
_this.checkTrExp();
_this.initAutoUpdateCache();
_this.subject.next({ action: 'viewer_loaded' });
_this.getReport();
});
};