AngularJS - controllers, services, REST to solve