initialize MethodStatic
Initializes Presentation library for the frontend.
Example:
await Presentation.initialize({
presentation: {
// specify locale for localizing presentation data, it can be changed afterwards
activeLocale: IModelApp.localization.getLanguageList()[0],
schemaContextProvider: (imodel) => MyAppFrontend.getSchemaContext(imodel),
},
favorites: {
storage: createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.UserPreferencesStorage),
},
selection: {
// tell @itwin/presentation-frontend to use our selection storage - this enables interop with
// unified selection storage used in this app
selectionStorage: MyAppFrontend.selectionStorage,
},
});
The method should be called after a call to IModelApp.startup.
initialize(props?: PresentationProps): Promise<void>
Parameter | Type | Description |
---|---|---|
props | PresentationProps |
Returns - Promise
Defined in
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.