How to show svg images in angular 12

Image

Learn how to show svg images in angular 12

Angular

This article helps to show svg images in your angular application.

By using <img> tag you would not be able to show svg images in angular application. For showing svg images we need to use inline-svg package from npm.

Install following npm package

npm i ng-inline-svg --save 

 

Add InlineSVGModule to import section of AppModule

Add below code in html to show svg file.

<div class="img-fluid" [inlineSVG]="svgURL"></div>
Widget is loading comments...

Top Articles