-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Expand file tree
/
Copy pathtokens.ts
More file actions
46 lines (41 loc) 路 1.23 KB
/
Copy pathtokens.ts
File metadata and controls
46 lines (41 loc) 路 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {InjectionToken} from '@angular/core';
/**
* Config object passed to initialize the platform.
*
* @publicApi
*/
export interface PlatformConfig {
/**
* The initial DOM to use to bootstrap the server application.
* @default create a new DOM using Domino
*/
document?: string;
/**
* The URL for the current application state. This is used for initializing
* the platform's location. `protocol`, `hostname`, and `port`.
*/
url?: string;
}
/**
* The DI token for setting the initial config for the platform.
*
* @publicApi
*/
export const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');
/**
* A function that will be executed when calling `renderApplication` or
* `renderModule` just before current platform state is rendered to string.
*
* @publicApi
*/
export const BEFORE_APP_SERIALIZED = new InjectionToken<ReadonlyArray<() => void | Promise<void>>>(
'Server.RENDER_MODULE_HOOK',
);
export const ENABLE_DOM_EMULATION = new InjectionToken<boolean>('ENABLE_DOM_EMULATION');