feat(platform-server): add API to render Module and ModuleFactory to string (#14381)
- PlatformState provides an interface to serialize the current Platform State as a string or Document. - renderModule and renderModuleFactory are convenience methods to wait for Angular Application to stabilize and then render the state to a string. - refactor code to remove defaultDoc from DomAdapter and inject DOCUMENT where it's needed.
This commit is contained in:
@ -1,9 +1,25 @@
|
||||
/** @experimental */
|
||||
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformDynamicServer: (extraProviders?: Provider[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformServer: (extraProviders?: Provider[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare class PlatformState {
|
||||
constructor(_doc: any);
|
||||
getDocument(): any;
|
||||
renderToString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function renderModule<T>(module: Type<T>, options: PlatformOptions): Promise<string>;
|
||||
|
||||
/** @experimental */
|
||||
export declare function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: PlatformOptions): Promise<string>;
|
||||
|
||||
/** @experimental */
|
||||
export declare class ServerModule {
|
||||
}
|
||||
|
Reference in New Issue
Block a user