APIs in the AssetLoader class
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.
Previous topic isProperty(value) Next topic getAppAlias()