App OnInit
Overview
The App component is the root component of an application. The App OnInit event handler is a lifecycle event that executes when the application initializes. This event is typically used to set up application-wide configurations, establish global variables, and perform startup logic before the UI is fully rendered.
Use Cases
- Initialize Application Context – Load global settings.
- Attach External Scripts – Load third-party analytics, monitoring tools, or other script-based services (e.g., Google Analytics, Segment Analytics).
Steps to Configure App OnInit
- Double click on the OnInit.
- You can see start and stop on the designer canvas, you can configure the constructs of your wish as per your logic and then click save.
App OnInit Properties
| Property | Description | Comments |
|---|---|---|
| Name* | Name of the OnInit lifecycle event. | This is not editable. |
| Async Operation* | Specifies execution of event flow as Sequential or Async. Yes as Async, No as Sequential. | Determines flow of execution. |
| Description | A brief explanation of the App OnInit event purpose. | Helps users understand the App OnInit functionality. |
Note: (*) Mandatory properties for adding a AppComponent OnInit.
A success message is displayed when AppComponent is updated successfully.