Selecting Content

In this lesson, we'll learn how to insert content into specific locations in a child component.

We'll cover the following

In some cases, we may want to insert content into different locations in a component. We can use the NgContent directive to specify what content can be loaded in its place.

For this example, we’re going to add a heading section for the alert component. Bootstrap supports a heading by adding an <h4> element with the alert-heading class.

Get hands-on with 1200+ tech skills courses.