Replies
0
Thanks Stamen,
The second parameter is actually a String such as "<svg ……></svg>", I checked that with debugging.
I also tried the example with the "fa-coffee", and that does not work either.
Also, I think this is all due to the fact that we do NOT include the whole font style sheet.
We use https://github.com/FortAwesome/angular-fontawesome as a dependency, which lets us use, say the coffe icon with
import { faCoffee } from '@fortawesome/free-solid-svg-icons';
and
<fa-icon [icon]="faCoffee"></fa-icon>
So perhaps, it would be great if angular-fontawesome were supported.
0
Event after feeding all the IconDefinitions of a good dozen icons all I see rendered is
<igx-icon _ngcontent-qai-c418="" tabindex="0" ng-reflect-font="fas" ng-reflect-icon-name="home" ng-reflect-router-link="" class="fas home igx-icon" aria-hidden="true" id="igx-icon-1"><!--container--><!--container--><!--container--><!--bindings={ "ng-reflect-ng-template-outlet": "[object Object]"}--></igx-icon>
This are the imports:
import {
faChartPieasfasChartPie,
faCheckCircleasfasCheckCircle,
faCogsasfasCogs,
faHomeasfasHome,
faInfoasfasInfo,
faQuestionasfasQuestion,
faSearchasfasSearch,
faTimesCircleasfasTimesCircle,
} from "@fortawesome/pro-regular-svg-icons";
import {
faChartPie,
faCheckCircle,
faCogs,
faHome,
faInfo,
faQuestion,
faSearch,
faTimesCircle,
} from "@fortawesome/pro-solid-svg-icons";
and this is how I add the SVG payload:
[
faChartPie,
faCheckCircle,
faCogs,
faHome,
faInfo,
faQuestion,
fasChartPie,
fasCheckCircle,
fasCogs,
faSearch,
fasHome,
fasInfo,
fasQuestion,
fasSearch,
fasTimesCircle,
faTimesCircle,
].forEach(d => iconService.addSvgIconFromText(d.iconName, d.icon[4] as string, d.prefix));