An AngularJS exercise on controllers and services