npm install ionicons
add the code below to "assets" in the angular.json file.
{
"glob": "**/*",
"input": "./node_modules/ionicons/dist/ionicons/",
"output": "./ionicons/"
}
add the import below to "scripts" in the angular.json file.
"./node_modules/ionicons/dist/ionicons.js"
We’ve started by importing CUSTOM_ELEMENTS_SCHEMA
from @angular/core
and added it to the application’s @NgModule
declaration in the schemas
property.
You can now use ionicons as you would expect: <ion-icon name="heart"></ion-icon>