Error in getWebAppBackendUrl

Options
vishet
vishet Registered Posts: 17 ✭✭✭✭

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.

Answers

  • Marine
    Marine Dataiker, Registered Posts: 29 Dataiker
    edited July 17
    Options

    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 <span class="pre">/plugins/__plugin_name__/resource/__file_to_get__</span>.

    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)

Setup Info
    Tags
      Help me…