From the course: Learning Ember.js

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Solution: Finish building a component

Solution: Finish building a component

From the course: Learning Ember.js

Start my 1-month free trial

Solution: Finish building a component

Let's take a look and see how I approach the challenge. I found that creating the model data first was the easiest way to approach this. So I copied the code from challenge.snippets.txt, and placed it as a model hook inside of a route object, and I did that starting on line seven and going through lines 22. And because of Ember's strict naming conventions, that route object needed to be named App.ArtistRoute. When I saw the model data, I saw that the property names were artists and work, so, that gave me some direction on how to build the Ember component. What really gave me direction was the name of the custom element that was already created. It's called artist-info, and in order to make sure that the component was properly mapped to the custom element it was creating, that meant I had to create a component template with that ID. And that's what I did starting on line 40. I created a component template and named it components/artist-info. And inside the template are references to…

Contents