Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions goldens/public-api/angular/ssr/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
```ts

import { EnvironmentProviders } from '@angular/core';
import { InjectionToken } from '@angular/core';

// @public
export class AngularAppEngine {
Expand Down Expand Up @@ -34,6 +35,15 @@ export enum RenderMode {
Server = 1
}

// @public
export const REQUEST: InjectionToken<Request>;

// @public
export const REQUEST_CONTEXT: InjectionToken<unknown>;

// @public
export const RESPONSE_INIT: InjectionToken<ResponseInit>;

// @public
export type ServerRoute = ServerRouteAppShell | ServerRouteClient | ServerRoutePrerender | ServerRoutePrerenderWithParams | ServerRouteServer;

Expand Down
2 changes: 2 additions & 0 deletions packages/angular/ssr/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ export {
provideServerRoutesConfig,
RenderMode,
} from './src/routes/route-config';

export { REQUEST, RESPONSE_INIT, REQUEST_CONTEXT } from './src/tokens';
3 changes: 3 additions & 0 deletions packages/angular/ssr/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ import { InjectionToken } from '@angular/core';

/**
* Injection token for the current request.
* @developerPreview
*/
export const REQUEST = new InjectionToken<Request>('REQUEST');

/**
* Injection token for the response initialization options.
* @developerPreview
*/
export const RESPONSE_INIT = new InjectionToken<ResponseInit>('RESPONSE_INIT');

/**
* Injection token for additional request context.
* @developerPreview
*/
export const REQUEST_CONTEXT = new InjectionToken<unknown>('REQUEST_CONTEXT');