Skip to content

Feature request: FaLayersText and FaLayersCounter components work when provided to FaLayers through content projection #479

@maidmehic

Description

@maidmehic

Describe the problem you'd like to see solved or task you'd like to see made easier

Currently, providing FaLayersText and FaLayersCounter components to FaLayers through content projection throws the following error:
Error: _FaLayersTextComponent should be used as child of FaLayersComponent only.

Is this in relation to an existing part of angular-fontawesome or something new?

Layering of icons, text and counters.

Why would other angular-fontawesome users care about this?

Content projection is a powerful pattern when building reusable components. You might want to wrap FaLayers component, and apply some common styles/logic to it:

<fa-layers
    class="layered-icon"
    [ngClass]="[size() ? 'layered-icon--' + size() : '', extraClasses() ? extraClasses() : '']">
    <ng-content></ng-content>
</fa-layers>

This works great if FaIcon component is projected to FaLayers, while providing FaLayersText and FaLayersCounter components throw an error.

On a scale of 1 (sometime in the future) to 10 (absolutely right now), how soon would you recommend we make this feature?

7

Feature request checklist

  • This is a single feature (i.e. not a re-write of all of Font Awesome)
  • The title starts with "Feature request: " and is followed by a clear feature name (Ex: Feature request: moar cowbell)
  • I have searched for existing issues and to the best of my knowledge this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions