I'm new to Angular/TypeScript.
In my project, I used icons and I have to replace the icons with images in SVG format.
I downloaded the image here.
Now, I need to import this SVG image into the typeScript. But, I don't understand what I should do.
dashboard.component.ts
import { Component, OnInit } from '@angular/core';
import { Menu } from './types/menu';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css'],
})
export class DashboardComponent implements OnInit {
showSideBar: boolean = false;
menus: Menu[] = [
{
name: 'Administration',
iconClass: 'bx bx-lock-alt',
active: false,
submenu: [{ name: 'Portfolio', url: '/administration/portfolio' }],
},
];
Do you know how I have to replace 'bx bx-lock-alt', with the SVG?
For information: the SVG image was saved in the following path <img src="assets/images/file.svg.
Here is a reproduction stackblitz.
Thank you very much.