Articles in this section
Category / Section

How to render the annotation using the ng-template in Angular Progressbar?.

1 min read

Description

This article shows how to render the annotations using the ng-template in Angular Progressbar.

Solution

Adding annotations to a progress bar can be a helpful way to provide additional information or context about the progress being displayed.

You can customize the annotations of the progress bar by setting the HTML div element in the ng-template to the content property of the annotations.

Code Snippet

The following code example shows how to render the annotations using the ng-template.

app.component.html

<ejs-progressbar #progressObj [annotations]='annotations'>
</ejs-progressbar> 

app.component.ts

public annotations: Object[] = [
       {
           content: '<ng-template #template1><div id="point1" style="font-size:20px;font-weight:bold;color:#0078D6;"><span>80%</span></div></ng-template>'
       }
   ];

The following image illustrates the output of the above code.

image.png

View Sample in Stackblitz

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied