-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use ng-container *ngFor inside a fa-layer #283
Comments
devoto13
added a commit
to devoto13/angular-fontawesome
that referenced
this issue
Dec 10, 2020
Silently dropping unsupported elements seems to create more pain then it generates benefit: it is confusing and does not support all use cases (for example fa-icon inside ng-container). It is better to relax it and assume that users only provide supported elements. Fixes FortAwesome#283
devoto13
added a commit
that referenced
this issue
Dec 11, 2020
Silently dropping unsupported elements seems to create more pain then it generates benefit: it is confusing and does not support all use cases (for example fa-icon inside ng-container). It is better to relax it and assume that users only provide supported elements. Fixes #283
devoto13
added a commit
to devoto13/angular-fontawesome
that referenced
this issue
Dec 11, 2020
Previously we would silently drop elements without stackItemSize, which was confusing to users. With this change we also stop making assumptions about the passed elements to prevent issues like FortAwesome#283, but in fa-stack. Fixes FortAwesome#177
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What I would like to do is have be able to define icons with layers, text etc using objects in the typescript code. I can then pass these to a custom component that uses fa-layers to render them. This way I don't have to create a component for each layered icon or duplicate code across the app.
To achieve this I was going to loop through the layers in a ng-container and then use an ngSwitch to render a fa-icon, fa-counter etc.
Unfortunately the ng-container is ignored and no content is returned.
A simple loop on a fa-icon works but that won't allow full layering with the different options.
This is is an example of my current icon definitions without the typing. Which would be of the form type: 'icon' (default) etc.
The text was updated successfully, but these errors were encountered: