AngularJS book examples rewritten for Angular 1.3.1