Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GlobalBrowserApi

ILC exposes some utility APIs globally at window.ILC. Here we provide convenience typings to use with typescript.

example
import { GlobalBrowserApi } from 'ilc-sdk/app';

GlobalBrowserApi.navigate('/mypath');

Hierarchy

  • GlobalBrowserApi

Index

Constructors

constructor

Properties

Static getAllSharedLibNames

getAllSharedLibNames: GetAllSharedLibNames = ...

Will return names of all registered shared libraries in ILC-Registry

example
const sharedLibNames = await ILC.getAllSharedLibNames();

Static mountRootParcel

mountRootParcel: MountParcel = ...

Will create and mount a single-spa parcel. See details here.

example
const parcel = ILC.mountRootParcel(() => ILC.importParcelFromApp('@portal/people', 'person'), {
 prop1: 'value1',
 domElement: document.getElementById('a-div'),
});

Methods

Static importParcelFromApp

  • Allows to fetch Parcel from the application and inject it with ILC specific configuration.

    example
    import Parcel from 'single-spa-react/parcel';
    
    <Parcel
    config={() => ILC.importParcelFromApp('@portal/people', 'person')}
    wrapWith="div"
    prop1="value1"
    />
    

    Type parameters

    • ExtraProps

    Parameters

    • appName: string
    • parcelName: string

    Returns Promise<LifeCycles<ParcelLifecycleFnProps<ExtraProps, unknown>>>

Static navigate

  • navigate(urlWithoutLocale: string): void
  • Can be used for programmatic route change at simple apps. Localization of the URL will be done automatically.

    Parameters

    • urlWithoutLocale: string

    Returns void

Generated using TypeDoc