File

devtools/src/session_route_provider.ts

Description

Overrides the default SessionRouteProvider to add the devtools query parameter. This will ensure that when a new session is started in the context of the devtools, that the new session window stays in that devtools context.

When the default SessionRouteProvider is overridden by a custom implementation, and you wish to have to same effects as this SessionRouteProvider, then the provideRoutePath should return a path containing the query parameter 'devtools'.

  • Example

import { Injectable } from '@angular/core';
import { SessionRouteProvider } from '@blueriq/angular';
import { SessionId } from '@blueriq/core';

@Injectable()
export class MySessionRouteProvider implements SessionRouteProvider {
  provideRoutePath(sessionId: SessionId): string {
    return `/session/${sessionId}?devtools`;
  }
}

Extends

internal_ConfiguredSessionRouteProvider

Index

Methods

Methods

provideRoutePath
provideRoutePath(sessionId: SessionId)

Given the session id to load, the path string from the default SessionRouteProvider.provideRoutePath function is returned concatenated with the devtools query parameter that will then be opened in a new tab.

Parameters :
Name Type Optional Description
sessionId SessionId No

The session id to load, which is just a string.

Returns : string

the route path to redirect to containing the query parameter devtools.

results matching ""

    No results matching ""