Error in getWebAppBackendUrl

vishet
Level 3
Error in getWebAppBackendUrl

Hi,

I am creating a plugin that contains multiple resource files(HTML/js/CSS) and when I add a new HTML file under the web app, first off, I cannot reference it using the normal method (absolute reference) secondly, I keep getting an error that getWebAppBackendUrl is not found if I use it in a js file in the resource folder. 

Any help would be highly appreciated.

0 Kudos
1 Reply
Marine
Dataiker

Hi, 

The error that you are getting with getWebAppBackendUrl is linked to your first issue with the absolute reference.

Additional files from the pluginโ€™s resource folder can be accessed by referencing them with /plugins/__plugin_name__/resource/__file_to_get__.

For a js file, it would be for instance : 

 

<script src="/plugins/__plugin_name__/resource/__file_name__.js" type="text/javascript"></script>

 

For more details, you may have a look at the documentation and this example (with html , js and css resource files)

 

 

0 Kudos