A
A
Anatoly Salamatin2018-11-04 23:35:05
Angular
Anatoly Salamatin, 2018-11-04 23:35:05

How to make svg component in Angular app?

Hello. How to properly work with svg icons in angular 6+? So that I can just write in the right place app-svg , pass for example name and the desired icon is displayed. In addition, you need the ability to edit the size and color of the icon. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
A person from Kazakhstan, 2018-11-05
@LenovoId

https://codepen.io/clintonhalpin/pen/xBDqs

Q
Qairat, 2018-11-13
@Qairat

In one project, I used this site icomoon.
You upload all the icons there, then it will give you it as fonts.
and you can use it in templates like this: and in styles for it, write the style:

.icon-pen {
  color: red;
  font-size:30px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question