@nguniversal/express-engine
Version:
Express Engine for running Server Angular Apps
32 lines (26 loc) • 941 B
TypeScript
import { NgModuleFactory } from '@angular/core';
import { Request as Request_2 } from 'express';
import { Response as Response_2 } from 'express';
import { StaticProvider } from '@angular/core';
import { Type } from '@angular/core';
/**
* This is an express engine for handling Angular Applications
*/
export declare function ngExpressEngine(setupOptions: Readonly<NgSetupOptions>): (filePath: string, options: object, callback: (err?: Error | null | undefined, html?: string | undefined) => void) => void;
/**
* These are the allowed options for the engine
*/
export declare interface NgSetupOptions {
bootstrap: Type<{}> | NgModuleFactory<{}>;
providers?: StaticProvider[];
}
/**
* These are the allowed options for the render
*/
export declare interface RenderOptions extends NgSetupOptions {
req: Request_2;
res?: Response_2;
url?: string;
document?: string;
}
export { }