following egghead tutorial for angularjs