1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import {HttpContext} from "../context";
|
10 | import {HttpViewEngine} from "../types";
|
11 | import {IncomingMessage, ServerResponse} from "http";
|
12 | import * as angular from "angular";
|
13 | import IModule = angular.IModule;
|
14 |
|
15 | export declare class NgApplication {
|
16 | useService(serviceCtor: Function): NgApplication;
|
17 | hasService(serviceCtor: Function): any;
|
18 | getService(serviceCtor: Function): any;
|
19 | }
|
20 |
|
21 | export declare class NgContext {
|
22 | application: NgApplication;
|
23 | request: IncomingMessage;
|
24 | response: ServerResponse;
|
25 | getApplication(): NgApplication;
|
26 | }
|
27 |
|
28 | export declare class NgEngine extends HttpViewEngine {
|
29 | constructor(context: HttpContext);
|
30 |
|
31 | context: HttpContext;
|
32 | getContext(): HttpContext;
|
33 | render(filename: string, data: any, callback: (err?: Error, res?: string) => void);
|
34 | renderString(str: string, data?: any): Promise<any>;
|
35 | bootstrap(bootstrapFunc: (angular: angular.IAngularStatic) => IModule): NgEngine;
|
36 |
|
37 | }
|
38 |
|
39 | export declare function createInstance(): NgEngine;
|