Reputation: 8177
I'm trying to learn Ember by following the instructions from their guides. I've created a route called favorites (http://guides.emberjs.com/v1.13.0/concepts/naming-conventions/) but I can access the url http://localhost:port/favorites.
Am I missing something?
Here is my router.js:
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('favorites');
});
export default Router;
And my favorites.hbs:
<ul>
{{#each favorites as |item|}}
<li>{{item.name}} - {{item.email}}</li>
{{/each}}
</ul>
I've pushed my project to this GitHub repo.
Upvotes: 0
Views: 1574
Reputation: 11303
You are missing an {{outlet}}
helper in your application.hbs
template.
Ember.js will render the favorites template into the {{outlet}} in the application template. It will set an instance of the controller:favorites as the controller for the template.
Upvotes: 2