AngularJS and REST service for tasks