ember.js - Route not working on Ember -
i'm trying learn ember following instructions guides. i've created route called favorites (http://guides.emberjs.com/v1.13.0/concepts/naming-conventions/) can access url http://localhost:port/favorites.
am missing something?
here router.js:
import ember 'ember'; import config './config/environment'; var router = ember.router.extend({ location: config.locationtype }); router.map(function() { this.route('favorites'); }); export default router;
and favorites.hbs:
<ul> {{#each favorites |item|}} <li>{{item.name}} - {{item.email}}</li> {{/each}} </ul>
i've pushed project github repo.
you missing {{outlet}}
helper in application.hbs
template.
ember.js render favorites template {{outlet}} in application template. set instance of controller:favorites controller template.
Comments
Post a Comment