Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions guides/v3.5.0/tutorial/simple-component.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
As a user looks through our list of rentals, they may want to have some interactive options to help them make a decision.
Let's add the ability to toggle the size of the image for each rental.
To do this, we'll use a component.

Let's generate a `rental-listing` component that will manage the behavior for each of our rentals.
A dash is required in every component name to avoid conflicting with a possible HTML element,
so `rental-listing` is acceptable but `rental` isn't.
As a user looks through our list of rentals, they may want to have some
interactive options to help them make a decision. Let's add the ability to
toggle the size of the image for each rental. To do this, we'll use a component.

Ember components are used to turn markup text and styles into reusable content.
Components can be included in any route's template, even multiple times, saving
you from copy-and-pasting the same code around your application.

Let's generate a `rental-listing` component that will manage the behavior for
each of our rentals. A dash is required in every component name to avoid
conflicting with a possible HTML element, so `rental-listing` is acceptable but
`rental` isn't.

```bash
ember g component rental-listing
Expand Down