Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

APIs in the AssetLoader class

Updated on July 20, 2021

Use the APIs in the AssetLoader class to load script files and CSS files to the browser's Document Object Model (DOM).

  • getAppAlias()

    Obtains the alias of the application for the current request.

  • getConstellationServiceUrl()

    Obtains the top-level URL of the Constellation Service.

  • getLoader(name)

    Obtains the loader function associated with the name of the specified custom loader.

  • getStaticServerUrl()

    Obtains the static server URL that is used to retrieve static content.

  • getSvcComponent(name)

    Calls the Constellation Service to fetch a custom component. This call is authenticated by the Constellation Service, using the issued B2S JWT token.

  • getSvcComponentsConfig(criteriaToMatch, options)

    Calls the Constellation Service to fetch the corresponding component config.json file that satisfies the specified properties. This call is authenticated by the Constellation Service, using the issued B2S JWT token.

  • getSvcImage(key)

    Calls the Constellation Service to fetch an image. This call is authenticated by the Constellation Service, using the issued B2S JWT token.

  • getSvcLocale(locale, key)

    Obtains the localization instance from the Constellation service for a given user locale and an instance key. This call is authenticated by the Constellation service, using the issued B2S JWT token.

  • initServer(url [, b2sJWT])

    Initiates the server associated with the specified URL.

  • loadAssets(assets)

    Loads asset dependencies as individual promises.

  • register(name, loaderFn)

    Registers a custom loader to the AssetLoader class.

  • setAppAlias(appAlias)

    Assigns a value to the alias of the application for the current request.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us