src/modules/session-ui/pages/preloading/preloading-page.component.ts
Preloading Page smart component.
This page will be shown when the application starts and will fetch the user profile (via the StarkUserService) to perform the login of the user. It will redirect to the target page (via the StarkRoutingService) as soon as the user profile is loaded and logged in.
OnInit
changeDetection | ChangeDetectionStrategy.OnPush |
encapsulation | ViewEncapsulation.None |
host | { |
selector | stark-preloading-page |
templateUrl | ./preloading-page.component.html |
Properties |
|
Methods |
Inputs |
Public
constructor(logger: StarkLoggingService, userService: StarkUserService, sessionService: StarkSessionService, routingService: StarkRoutingService)
|
||||||||||||||||||||
Class constructor
Parameters :
|
targetState | |
Type : string
|
|
Target page to navigate to after the user profile is loaded and automatically logged in. |
targetStateParams | |
Type : RawParams
|
|
Params to pass to the target page (if any). |
Public ngOnInit |
ngOnInit()
|
Component lifecycle hook
Returns :
void
|
Public reload |
reload()
|
Reload the page through the routingService.
Returns :
void
|
Public correlationId |
Type : string
|
Default value : "undefined"
|
The current correlation Id of the application (useful when troubleshooting errors). |
Public logger |
Type : StarkLoggingService
|
Decorators :
@Inject(STARK_LOGGING_SERVICE)
|
- The `StarkLoggingService` instance of the application.
|
Public routingService |
Type : StarkRoutingService
|
Decorators :
@Inject(STARK_ROUTING_SERVICE)
|
- The `StarkRoutingService` instance of the application.
|
Public sessionService |
Type : StarkSessionService
|
Decorators :
@Inject(STARK_SESSION_SERVICE)
|
- The `StarkSessionService` instance of the application.
|
Public userFetchingFailed |
Default value : false
|
Whether the fetching of the user profile failed |
Public userService |
Type : StarkUserService
|
Decorators :
@Inject(STARK_USER_SERVICE)
|
- The `StarkUserService` instance of the application.
|