Page 1 of 1

Web api with Angular use case with different urls

Posted: Wed Apr 08, 2020 7:43 pm
by dino
So, I'm using more or less this,
just instead of Angular - it's plain Js.

Let's say API is at api.example.com, Js front at example.com/report.
On viewer I managed to get it working with static style in document and this "hack":

Code: Select all

Stimulsoft.Viewer.parameters.requestUrl = Stimulsoft.Viewer.parameters.requestAbsoluteUrl;
btw. useRelativeUrls is set to false.

On designer, I can't change the URL of loading images, which are referenced from CSS or dynamic Js I suppose.
And this one, which seems important:

Code: Select all

Designer?stiweb_component=Designer&stiweb_action=Resource&stiweb_cachemode=cache&stiweb_version=2020.2.1&stiweb_data=AllNotLoadedScripts

Regards.

Re: Web api with Angular use case with different urls

Posted: Tue Apr 14, 2020 8:14 am
by Lech Kulikowski
Hello,

You can use the stylesUrl and scriptsUrl options for the designer.
Also, we have added support to send the requestAbsoluteUrl option from the server side, it will be available in the next build.

Thank you.

Re: Web api with Angular use case with different urls

Posted: Mon Feb 22, 2021 5:05 am
by swaraj
Capture1.JPG
Capture1.JPG (200.5 KiB) Viewed 1470 times
requestAbsoluteUrl, image Urls in Designer Get API response is coming as in the screenshot below. Is there any way to override it? It is not same as the url provided in the <stimulsoft-designer-angular [requestUrl]

Re: Web api with Angular use case with different urls

Posted: Tue Feb 23, 2021 12:17 pm
by Vadim
Hello.

You can access it in Designer (designerLoaded) event:
let viewerId = this.designer.designerEl.nativeElement.firstChild.jsObject.options.viewerId;
window["js" + viewerId + "Parameters"].options.requestAbsoluteUrl;