language/src/services/localized-route-aware.service.ts
Integrates with the LanguageIntegrationService
and facilitates language related work in route-aware services.
Properties |
|
Methods |
|
constructor(language: LanguageIntegrationService, router: Router, route: ActivatedRoute, componentBus?: RouterOutletComponentBus)
|
||||||||||||||||||||
Creates an instance of LocalizedRouteAware. Provide this when you want your route-aware service to have access to the instance(s) of the activated component(s).
Parameters:
|
||||||||||||||||||||
Protected onLanguageChanged | ||||||||
onLanguageChanged(lang: string)
|
||||||||
Called when the current language used by the integrated app has changed. Override to implement.
Parameters:
Returns:
void
|
||||||||
Protected onLanguageServicesReady |
onLanguageServicesReady()
|
Called when the app's language services have initialized and are ready for use. When language integration is disabled, or no ready observable have been provided by the app this will execute immediatelly on construction time. Override to implement.
Returns:
void
|
Protected deepScanRoute | ||||||||||||||||||||
deepScanRoute(route: ActivatedRouteSnapshot, process: (route: ActivatedRouteSnapshot,component: any) => void, levels: number)
|
||||||||||||||||||||
Inherited from
RouteAware
|
||||||||||||||||||||
Recoursively runs a processing function on the route and its children. Scan is done from parent to child, meaning the parent is the first to process. and a Returning
Parameters:
Returns:
void
|
||||||||||||||||||||
Protected observeRouterEvent | |||||||||||||||
observeRouterEvent(eventType: Type
|
|||||||||||||||
Inherited from
RouteAware
|
|||||||||||||||
Type parameters:
|
|||||||||||||||
Creates an observable that emits only the specified router events and is automatically destroyed when the service/component is destroyed.
Parameters:
Returns:
Observable<TEvent>
|
|||||||||||||||
Protected resolve | ||||||||||||
resolve(resolvers: Resolver | Resolver[], ...resolverArgs: any[])
|
||||||||||||
Inherited from
RouteAware
|
||||||||||||
Creates an observable that runs all the specified resolvers and concats their results as an array. The resolvers will be passed with the instance of the component for the currently activated route.
Parameters:
Returns:
Observable<any[]>
An array with the concatenated results of the resolvers. |
||||||||||||
Protected resolveInMacroTask | ||||||||||||
resolveInMacroTask(resolvers: Resolver | Resolver[], ...resolverArgs: any[])
|
||||||||||||
Inherited from
RouteAware
|
||||||||||||
Creates an observable that runs all the specified resolvers and concats their results as an array. The resolvers will be passed with the instance of the component for the currently activated route. Angular Universal: In SSR, the server doesn't wait for async code to complete. The result is scrapers and search engines receiving a page without resolved data, which is bad in case you need them to read some resolved metadata tags for example. Using
See https://stackoverflow.com/a/50065783/4371525 for the discussion. See {ResolverMacroTaskIdPrefix} if you need to identify the created macro task in your code.
Parameters:
Returns:
Observable<any[]>
|
||||||||||||
ngOnDestroy |
ngOnDestroy()
|
Inherited from
Destroyable
|
Returns:
void
|
Protected subscribe | ||||||||||||||||||||
subscribe(observable: Observable
|
||||||||||||||||||||
Inherited from
Destroyable
|
||||||||||||||||||||
Type parameters:
|
||||||||||||||||||||
Subscribes to an observable and stores the subscription for automatic disposal.
When
Parameters:
Returns:
Subscription
The subscription created for the observable. |
||||||||||||||||||||
Protected Readonly destroyed |
Type: Subject<void>
|
Default value: new Subject()
|
Inherited from
Destroyable
|
Emits a value when |
Protected Readonly subscriptions |
Type: Subscription
|
Default value: new Subscription()
|
Inherited from
Destroyable
|
A list of all subscriptions manually added using the |