# new AppComponent(platform, router, menuController, titleService)
This component serves as the main entry point for the application. It sets up the navigation menu, handles routing events, and initializes the application state. It also manages the application title and menu visibility.
Root component of the Decaf-ts for Angular application
Parameters:
Name | Type | Description |
---|---|---|
platform |
Platform
|
Ionic Platform service |
router |
Router
|
Angular Router service |
menuController |
MenuController
|
Ionic MenuController service |
titleService |
Title
|
Angular Title service |
Example
<app-root></app-root>
Classes
- AppComponent
Sets up Ionic icons and disables the menu controller
Members
# initialized
Flag indicating if the application has been initialized
.Flag indicating if the application has been initialized
# initialized
Flag indicating if the application has been initialized
.Flag indicating if the application has been initialized
# menu
The menu items for the application's navigation
.The menu items for the application's navigation
Array
# menu
The menu items for the application's navigation
.The menu items for the application's navigation
Methods
# async initializeApp() → {Promise.<void>}
Sets the initialized flag and sets up repositories if in development mode
Initializes the application
Promise.<void>
# async ngOnInit() → {Promise.<void>}
Sets up router event subscriptions and initializes the application
Lifecycle hook that is called after data-bound properties of a directive are initialized
Promise.<void>
# setTitle(page) → {void}
Updates the document title with the application name and current page
Sets the application title based on the current page
Parameters:
Name | Type | Description |
---|---|---|
page |
string
|
The current page URL |
void