-
Notifications
You must be signed in to change notification settings - Fork 2
09.0.0 Use a Component For Rating
bazzel edited this page Nov 14, 2014
·
1 revision
- Create a component for rating
See the installation instructions. Use tag 9.0.0.
- Open
app/templates/products/show.hbs
and within the{{#each reviews}}
helper, replace all the<span class='glyphicon...
tags with{{star-rating starCount=rating}}
. - Inspect the error shown in the Console tab in the browser. Ember is missing the
star-rating
component, so let's create this. - In the terminal, enter
ember g component star-rating
. - Open
app/templates/components/star-rating.hbs
and replace the content with the code from this gist from star-rating.hbs. - Open
app/components/star-rating.js
and replace the content with the code from this gist from star-rating.js.