AngularJS: Practice 36 upgrade