This is my continuing efforts to work with the Ember JS (www.emberjs.org) Framework. The expectation is to build a simple wish list of items. Part one started the Ember application, part two started our first route and today we're actually going to have the application do something by having it respond to a mouse click.
Currently, the application shows a list. Not exactly ground breaking, or very useful. So, what we need is to make the system respond to user interaction. Since this is the web, that interaction is a click event.
The default behavior for the action helper is to add a click event listener to the associated HTML element. This means that clicking the LI element will call the showPerson function from the items route class.
This means we need to modify the items route class file to add this function definition. For now, all we'll do is use an alert dialog to display the book title, later we'll make changes to display more information about the item.
So, now our application is actually doing something.
Next time, we'll be introducing how to share things appropriately.