App class
Provides access to the app that is initialized in the UI.
Signature:export declare class App
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the App
class.
Example
The following example shows how to retrieve an App
:
// Connect as anonymous user to a geoapps environment
geoapps.Initialize("<specified tenant>");
// Load the app into a variable and get the app title
var app = geoapps.AddApp("myapp", "<appId>");
// Wait till the app loaded and get the title
app.onLoaded.add(() => {
console.log(app.Title);
});
Events
Property | Modifiers | Type | Description |
---|---|---|---|
onLoaded | readonly | GAEvent<GAEventArgs> | Triggers when the app is loaded |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
AppId | readonly | string | Gets the application Id |
AppTypeId | readonly | string | Get the application type Id |
Name | readonly | string | Gets the name of the app |
ResourceId | readonly | string | Get the application resource |
Screens | readonly | Screen[] | Gets the screens |
Version | readonly | string | Get the application version |
Methods
Method | Modifiers | Description |
---|---|---|
AddScreen(screen) | Add a screen to the app | |
Get(key) | Gets a setting by the specified key | |
GetScreenById(screenId) | Gets screen by screen id | |
Set(key, value) | Add or update a setting |