The Default Component Template

In this lesson, you’ll learn about default component templates.

We'll cover the following

When we generate a component with Ember-CLI, we see that it has nothing but a {{yield}} inside.

You saw in the Components chapter that the StarRating component could be used in two forms: block and non-block. When used in its block form, yield defines the slot where the calling context can render its content.

To give an example, a form component that focuses on the first text input field when rendered would just have a {{yield}} as its template and could be used like this:

Get hands-on with 1200+ tech skills courses.