In the Angular service code, when you replace the dummy JSON data references with an actual REST endpoint URL, you would run into CORS errors.
No Access-Control-Allow-Origin header is present on the requested resource.
This is a commonly faced error when invoking resources hosted on a different domain than the currently hosted site. This requires your endpoints to say that they will allow calls from certain origins, which is done by passing additional HTTP headers.
CORS is a mechanism that uses additional HTTP headers to let a user agent gain permission to access selected resources from a server on a different origin (domain) than the site currently in use. For reference, visit https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
Apart from allowing the requests from an origin, browsers will restrict certain HTTP methods as well. These too...