Skip to content

Demo application showing how to use the HttpClient and Observables to make API calls from Angular 5

Notifications You must be signed in to change notification settings

rcmarini/angular5-httpclient-demo

 
 

Repository files navigation

Angular 5 HTTP Client Demo App

This is a demo application showing how to use the HttpClient service and Observables in Angular 5.

For background on the topic of Angular HTTP requests, please see my blog posts:

https://www.metaltoad.com/blog/angular-2-http-observables-and-concurrent-data-loading

https://www.metaltoad.com/blog/angular-2-using-http-service-write-data-api

Note: This app uses the new and improved HttpClient service introduced in Angular 4.3. If you are using Angular 2 or Angular 4 v4.2 and below, see this older demo using the deprecated Http service.

What's in here

  • app.js - a simple Express app which acts as the back-end API.
  • src/app/ - this folder contains the Angular app
  • config/ - this folder contains webpack-related scripts

Running the app

To run this application, you need NodeJS and NPM installed on your system. Then, run the following commands from your command prompt:

npm install
npm start

This will transpile the TypeScript files, bundle everything using Webpack, and start the Node server. The app will be available at http://localhost:3000/

About

Demo application showing how to use the HttpClient and Observables to make API calls from Angular 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 48.3%
  • JavaScript 45.2%
  • HTML 6.0%
  • CSS 0.5%