I’m working on a small sample app to get used to writing Ember apps. I’m pulling a JSON feed of my tweets and displaying them to the page. So that I can work on implementing a model into my code I’ve added a method called markAsRead.
I’d like to bind an event to each row item so that when it’s clicked it fires it’s own markAsRead method. The end goal is to change a class on the row item when that event is triggered. Here’s the code I’ve got so far:
http://andymatthews.net/code/emberTweets/
I know that Ember has it’s own way of doing things so I’m really looking for a best practice way to approach this.
Andy,
I’ve reconstructed what you have so far and added in the features you’re looking for in this jsFiddle: http://jsfiddle.net/ud3323/V4qZC/. Hopefully that clears everything up for you 🙂