Exercise in AngularJS