Constructors
constructor
- new View(fileName: string, options?: any): View
-
Parameters
-
fileName: string
-
Default value options: any = {}
Properties
defaultEngine
defaultEngine: any
pathPromise
pathPromise: any
Methods
Private lookup
- lookup(name: string): Promise<any>
-
Parameters
Returns Promise<any>
Private render
- render(options: object, callback: Function): Promise<void>
-
Parameters
-
options: object
-
callback: Function
Returns Promise<void>
Private resolve
- resolve(dir: string, file: string): Promise<any>
-
Parameters
Returns Promise<any>
Initialize a new
View
with the givenname
.Options:
defaultEngine
the default template engine nameengines
template engine require() cacheroot
root path for view lookup