tutorial code for - http://thejackalofjavascript.com/angularjs-hands-on-tutorial/