Content projection and structural directives

This section describes the techniques used to perform DOM manipulation in Angular. DOM manipulation is based on the following ideas:

  • An Angular template that encodes a chunk of HTML to be inserted and possibly repeated several times somewhere
  • The content placeholder that encodes a location to place the results of rendering Angular templates

The simplest form of DOM manipulation is content projection: content specified within the start and end tags of a component C is read as a template and projected in a location specified by a content placeholder inside of the C component template. Content projection adds the capability to include variable HTML furnished as input in the component template. The ...

Get Hands-On TypeScript for C# and .NET Core Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.