TemplateThumbPathPipe
TemplateThumbPathPipe is a pipe that returns the thumbnail image path for a given email template. This is particularly useful when you need to dynamically generate paths for template thumbnail images.
The
transform()
method returns the thumbnail image path for a given email template.Parameters:
template
: The name of the email template.type
: The file type of the thumbnail image (default is "jpg").
Returns:
- The path of the thumbnail image for the given email template.
<img [src]="templateName | templateThumbPath: 'png'" alt="Template thumbnail">
In this example,
templateName
is a variable containing the name of the template, and the templateThumbPath
pipe is used to generate the URL of the thumbnail image in PNG format. The resulting URL is then bound to the
src
attribute of an <img>
tag.Last modified 4mo ago