Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Document what is <ng-content> tag and how content projection works #3099

@devoto13

Description

@devoto13

Searching for ng-content on https://angular.io/docs/ts/latest/ doesn't produce any useful results and if I'm not mistaken there is no any detailed description about what it is and how it works. There are quite some blog posts showing examples of using it. It creates a lot of confusion for users, see:

Points, which should probably be documented:

  • projection just moves nodes from one place to another, which leads to following conclusions:
  • how to query only subset of nodes using <ng-content select="<selector>">
    • document, that only top-level nodes can be selected by this approach
  • document a recipe with template, Tobias referring here to created projected nodes only when they are needed

PS During work on this issue, it may be good idea to also improve documentation of projectableNodes as they are tied to functionality discussed here.

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