Code School code for AngularJS