Font-awesome: angular ng-if on I tag does not work

Created on 16 Feb 2018  路  10Comments  路  Source: FortAwesome/Font-Awesome

Hi,

I have an angular ng-if directive on a I tag. When it is converted to svg, I can still see it in the DOM on the svg tag (it has been copied) but it doesn't work anymore (not compiled?).
Thanks.

question

Most helpful comment

hummm, I'm using angular 1.x and I would need a js file... Maybe not ready for that yet?

All 10 comments

This also seems to be an issue with ngClass, which I've previously been using to dynamically swap between icons like left and right chevrons, up and down arrows. SVGs are just a no-go then? ...saves clock cycles.

A simple workaround for me is to put the ng-directives on a wrapper element. But this would be better if it could work as is without thinking about it...

Hey @cadilhac

We have an Angular component that we'd love for you to try out:

https://github.com/FortAwesome/angular-fontawesome

hummm, I'm using angular 1.x and I would need a js file... Maybe not ready for that yet?

Any solution to this problem? I am using fontawesome with angular v9

@tagliala yes this will work but for that I need to include _FontAwesomeModule_ in my project and cannot use icons with _i tag of html_. Is there any way to accomplish this with _i tag_. I found a workaround by using ngIf on parent tag of _i tag_

@poddarkhushbu07 are you using CSS implementation or SVG implementation?

@poddarkhushbu07 are you using CSS implementation or SVG implementation?

@tagliala SVG Implementation

@poddarkhushbu07 have you tried with autoReplaceSvg set to false?

If it still doesn't work, docs mention that you should use the angular module or use the css implementation

Ref:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

desspro picture desspro  路  3Comments

faithdong picture faithdong  路  3Comments

ufoczek picture ufoczek  路  3Comments

jakuuub picture jakuuub  路  3Comments

ghost picture ghost  路  3Comments