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 trialThomas McCracken
13,591 Pointsthis keyword is not working for me? deprecated too?
Ok, I've been following along and doing exactly as MIchael does in the video and it's not working for me. Here's what I had to do:
1) I created a post controller with a post property set to post returned from the route with the model.
2) this.id would not work as a link. I got an ember error about not having the right parameter or something. I replaced this.id with post.id and it works now.
Again, I don't know if anyone else is having trouble and my methods are correct but they're working so if you want to use them then please do so you don't have to bang your head against a wall trying to figure out why your app doesn't work. :D
1 Answer
Thomas McCracken
13,591 PointsHey, sorry for the confusion but 1) was not necessary and doesn't work anyway. On the template I had to use model.title and model.body that is provided by the PostRoute rather than just title and body. This helps too in the next video when editing.