Now that you’ve built your API, it’s time to use it with Angular. Also, since Node is a web server, it’d be nice to get it to serve your HTML rather than load it as a flat file like you’ve been doing thus far.
To perform HTTP calls in Angular, you’ll use its built-in HTTP client:
$http. If you haven’t noticed yet, official Angular components start with
$. You should not prefix components you create with a
$http is a pretty standard HTTP client with some of the usual suspects:
$http.post(), and so on. It is promise based.
If you look ...