Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Ember.js Models Loading Individual JavaScript Objects

Aslam Najeebdeen
Aslam Najeebdeen
617 Points

Problem loading the individual post to the post.hbs

Hello there,

I'm having problem loading the individual post to the post.hbs

Please watch this quick video: https://www.dropbox.com/s/n9990b0tuz7ik1b/ember.mp4?dl=0

Any idea that what I'm doing wrong?

Thanks.

5 Answers

Santiago Blanco
Santiago Blanco
2,939 Points

The problem is your controller... You need create an objectController... You have a default controller.

I had similar issue recently.I think that your problem is in your return statement at post.js. Instead of return posts.findBy('id', params.post_id) try return posts.findBy('id', parseInt(params.post_id)). In my case problem was when I call property post_id of params object.

Having the same issue, but @ilyakrupnov nailed it!

Daniel Breen
Daniel Breen
14,943 Points

My case was way different.

I had to change the handlebars

{{#link-to 'post' this.post.id}}