1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import { EventManager } from '@angular/platform-browser';
|
8 | import * as i0 from '@angular/core';
|
9 | import * as i1 from '@angular/common/http';
|
10 | import * as i2 from '@angular/platform-browser/animations';
|
11 | import * as i3 from '@angular/platform-browser';
|
12 | import { InjectionToken } from '@angular/core';
|
13 | import { NgModuleFactory } from '@angular/core';
|
14 | import { NgZone } from '@angular/core';
|
15 | import { PlatformRef } from '@angular/core';
|
16 | import { Provider } from '@angular/core';
|
17 | import { Renderer2 } from '@angular/core';
|
18 | import { RendererFactory2 } from '@angular/core';
|
19 | import { RendererType2 } from '@angular/core';
|
20 | import { StaticProvider } from '@angular/core';
|
21 | import { Type } from '@angular/core';
|
22 | import { Version } from '@angular/core';
|
23 | import { ɵSharedStylesHost } from '@angular/platform-browser';
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise<void>)[]>;
|
32 |
|
33 | /**
|
34 | * The DI token for setting the initial config for the platform.
|
35 | *
|
36 | * @publicApi
|
37 | */
|
38 | export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
39 |
|
40 | /**
|
41 | * Config object passed to initialize the platform.
|
42 | *
|
43 | * @publicApi
|
44 | */
|
45 | export declare interface PlatformConfig {
|
46 | /**
|
47 | * The initial DOM to use to bootstrap the server application.
|
48 | * @default create a new DOM using Domino
|
49 | */
|
50 | document?: string;
|
51 | /**
|
52 | * The URL for the current application state. This is used for initializing
|
53 | * the platform's location. `protocol`, `hostname`, and `port` will be
|
54 | * overridden if `baseUrl` is set.
|
55 | * @default none
|
56 | */
|
57 | url?: string;
|
58 | /**
|
59 | * Whether to append the absolute URL to any relative HTTP requests. If set to
|
60 | * true, this logic executes prior to any HTTP interceptors that may run later
|
61 | * on in the request. `baseUrl` must be supplied if this flag is enabled.
|
62 | * @default false
|
63 | */
|
64 | useAbsoluteUrl?: boolean;
|
65 | /**
|
66 | * The base URL for resolving absolute URL for HTTP requests. It must be set
|
67 | * if `useAbsoluteUrl` is true, and must consist of protocol, hostname,
|
68 | * and optional port. This option has no effect if `useAbsoluteUrl` is not
|
69 | * enabled.
|
70 | */
|
71 | baseUrl?: string;
|
72 | }
|
73 |
|
74 | /**
|
75 | * The server platform that supports the runtime compiler.
|
76 | *
|
77 | * @publicApi
|
78 | */
|
79 | export declare const platformDynamicServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | export declare const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 | export declare class PlatformState {
|
92 | private _doc;
|
93 | constructor(_doc: any);
|
94 | /**
|
95 | * Renders the current state of the platform to string.
|
96 | */
|
97 | renderToString(): string;
|
98 | /**
|
99 | * Returns the current DOM state.
|
100 | */
|
101 | getDocument(): any;
|
102 | static ɵfac: i0.ɵɵFactoryDeclaration<PlatformState, never>;
|
103 | static ɵprov: i0.ɵɵInjectableDeclaration<PlatformState>;
|
104 | }
|
105 |
|
106 | /**
|
107 | * Renders a Module to string.
|
108 | *
|
109 | * `document` is the full document HTML of the page to render, as a string.
|
110 | * `url` is the URL for the current render request.
|
111 | * `extraProviders` are the platform level providers for the current render request.
|
112 | *
|
113 | * @publicApi
|
114 | */
|
115 | export declare function renderModule<T>(module: Type<T>, options: {
|
116 | document?: string;
|
117 | url?: string;
|
118 | extraProviders?: StaticProvider[];
|
119 | }): Promise<string>;
|
120 |
|
121 | /**
|
122 | * Renders a {@link NgModuleFactory} to string.
|
123 | *
|
124 | * `document` is the full document HTML of the page to render, as a string.
|
125 | * `url` is the URL for the current render request.
|
126 | * `extraProviders` are the platform level providers for the current render request.
|
127 | *
|
128 | * @publicApi
|
129 | *
|
130 | * @deprecated
|
131 | * This symbol is no longer necessary as of Angular v13.
|
132 | * Use {@link renderModule} API instead.
|
133 | */
|
134 | export declare function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: {
|
135 | document?: string;
|
136 | url?: string;
|
137 | extraProviders?: StaticProvider[];
|
138 | }): Promise<string>;
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 | export declare class ServerModule {
|
146 | static ɵfac: i0.ɵɵFactoryDeclaration<ServerModule, never>;
|
147 | static ɵmod: i0.ɵɵNgModuleDeclaration<ServerModule, never, [typeof i1.HttpClientModule, typeof i2.NoopAnimationsModule], [typeof i3.BrowserModule]>;
|
148 | static ɵinj: i0.ɵɵInjectorDeclaration<ServerModule>;
|
149 | }
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 | export declare class ServerTransferStateModule {
|
158 | static ɵfac: i0.ɵɵFactoryDeclaration<ServerTransferStateModule, never>;
|
159 | static ɵmod: i0.ɵɵNgModuleDeclaration<ServerTransferStateModule, never, never, never>;
|
160 | static ɵinj: i0.ɵɵInjectorDeclaration<ServerTransferStateModule>;
|
161 | }
|
162 |
|
163 |
|
164 |
|
165 |
|
166 | export declare const VERSION: Version;
|
167 |
|
168 | export declare const ɵINTERNAL_SERVER_PLATFORM_PROVIDERS: StaticProvider[];
|
169 |
|
170 | export declare const ɵSERVER_RENDER_PROVIDERS: Provider[];
|
171 |
|
172 | export declare class ɵServerRendererFactory2 implements RendererFactory2 {
|
173 | private eventManager;
|
174 | private ngZone;
|
175 | private document;
|
176 | private sharedStylesHost;
|
177 | private rendererByCompId;
|
178 | private defaultRenderer;
|
179 | private schema;
|
180 | constructor(eventManager: EventManager, ngZone: NgZone, document: any, sharedStylesHost: ɵSharedStylesHost);
|
181 | createRenderer(element: any, type: RendererType2 | null): Renderer2;
|
182 | begin(): void;
|
183 | end(): void;
|
184 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵServerRendererFactory2, never>;
|
185 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵServerRendererFactory2>;
|
186 | }
|
187 |
|
188 | export { }
|