Class

AppComponent

AppComponent(platform, router, menuController, titleService)

Constructor

# 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

sequenceDiagram participant App as AppComponent participant Router participant MenuController participant TitleService participant Repository App->>App: constructor() App->>App: ngOnInit() App->>Router: Subscribe to events Router-->>App: Navigation events App->>MenuController: Enable/Disable menu App->>TitleService: Set page title App->>App: initializeApp() alt isDevelopmentMode App->>Repository: Initialize repositories end
Parameters:
Name Type Description
platform Platform

Ionic Platform service

router Router

Angular Router service

menuController MenuController

Ionic MenuController service

titleService Title

Angular Title service

View Source app/app.component.ts, line 133

Example
<app-root></app-root>

Classes

AppComponent

Sets up Ionic icons and disables the menu controller

Members

# activeItem

The currently active menu item

.

The currently active menu item

View Source app/app.component.ts, line 153

# activeItem

The currently active menu item

.

The currently active menu item

View Source app/app.component.ts, line 291

# adapter

The database adapter provider

.

The database adapter provider

View Source app/app.component.ts, line 157

# adapter

The database adapter provider

.

The database adapter provider

View Source app/app.component.ts, line 295

# disableMenu

disable or enable menu on page

.

disable or enable menu on page

View Source app/app.component.ts, line 169

# disableMenu

disable or enable menu on page

.

disable or enable menu on page

View Source app/app.component.ts, line 309

# initialized

Flag indicating if the application has been initialized

.

Flag indicating if the application has been initialized

View Source app/app.component.ts, line 161

# initialized

Flag indicating if the application has been initialized

.

Flag indicating if the application has been initialized

View Source app/app.component.ts, line 299

The menu items for the application's navigation

.

The menu items for the application's navigation

View Source app/app.component.ts, line 141

Array

The menu items for the application's navigation

.

The menu items for the application's navigation

View Source app/app.component.ts, line 277

# platform

Ionic Platform service

.

Ionic Platform service

View Source app/app.component.ts, line 145

Platform

# platform

Ionic Platform service

.

Ionic Platform service

View Source app/app.component.ts, line 282

# router

Angular Router service

.

Angular Router service

View Source app/app.component.ts, line 149

Router

# router

Angular Router service

.

Angular Router service

View Source app/app.component.ts, line 287

# title

The title of the application

.

The title of the application

View Source app/app.component.ts, line 137

# title

The title of the application

.

The title of the application

View Source app/app.component.ts, line 272

# titleService

Angular Title service

.

Angular Title service

View Source app/app.component.ts, line 165

Methods

# async initializeApp() → {Promise.<void>}

Sets the initialized flag and sets up repositories if in development mode

Initializes the application

View Source app/app.component.ts, line 332

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

View Source app/app.component.ts, line 324

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

View Source app/app.component.ts, line 340

void