File

core/router/context-route.service.ts

Index

Properties
Methods

Constructor

constructor(tabsResolver: RouterTabsResolver, tabsService: TabsService, router: Router, apiService: ApiService, injector: Injector)
Parameters :
Name Type Optional
tabsResolver RouterTabsResolver No
tabsService TabsService No
router Router No
apiService ApiService No
injector Injector No

Methods

destroy
: Use ScopedContextRouteService instead. Will be removed in 10.22
destroy()
Returns : void
getContextData
getContextData(activatedRoute: ActivatedRoute | ActivatedRouteSnapshot)

Resolves the current context data. If no context was found, null is returned.

Parameters :
Name Type Optional Description
activatedRoute ActivatedRoute | ActivatedRouteSnapshot No

The current activated route.

Returns : | null
getContextRoute
getContextRoute(contextData: ContextData)

Returns a route for the given ContextData.

Parameters :
Name Type Optional Description
contextData ContextData No

The ContextData object.

Returns : string

A route with the ids set correctly.

getRootContextOfChild
getRootContextOfChild(currentRoute: ActivatedRoute)

Gets the rootContext from the deepest child route in the hierarchy.

Traverses the route tree from activatedRoute to find the furthest child route that exists. Then extracts the rootContext from that route's configuration.

Parameters :
Name Type Optional
currentRoute ActivatedRoute No
Returns : any

The rootContext value from the deepest route, or undefined if not found

init
: Use ScopedContextRouteService instead. Will be removed in 10.22
init(route: ActivatedRoute)
Parameters :
Name Type Optional
route ActivatedRoute No
Returns : void
isContextRoute
isContextRoute(url: string, contextToCheck: ViewContext[])

Verifies if a given url is a view context route.

Parameters :
Name Type Optional Default value Description
url string No

A route url.

contextToCheck ViewContext[] No []

The view context(s) to check. If not provided, all contexts are checked.

Returns : boolean

true if the given url is a view context route.

refreshContext
refreshContext()

Reloads all ViewContexts.

Returns : void
setContext
setContext(activatedRoute: ActivatedRoute, contextData: IIdentified)

Sets a new contextData in the ActivatedRoute.

Parameters :
Name Type Optional Description
activatedRoute ActivatedRoute No

The current activated route.

contextData IIdentified No

New contextData.

Returns : void
updatedContext
: Use ScopedContextRouteService instead. Will be removed in 10.21
updatedContext(route: ActivatedRoute)
Parameters :
Name Type Optional
route ActivatedRoute No

Properties

activatedContextData
Type : ContextData
Default value : null

Last context data snapshot

refreshTrigger$
Default value : new Subject<void>()

results matching ""

    No results matching ""