TemplateLoader
Loads email templates based on the given request context, type and template name and return the template as a string.
Example
loadTemplate
method
(injector: Injector, ctx: RequestContext, input: LoadTemplateInput) => Promise<string>Load template and return it's content as a string
loadPartials
method
() => Promise<Partial[]>Load partials and return their contents. This method is only called during initialization, i.e. during server startup.
Loads email templates from the local file system. This is the default loader used by the EmailPlugin.
- Implements:
TemplateLoader
constructor
method
(templatePath: string) => FileBasedTemplateLoaderloadTemplate
method
(_injector: Injector, _ctx: RequestContext, { type, templateName }: LoadTemplateInput) => Promise<string>loadPartials
method
() => Promise<Partial[]>Was this chapter helpful?