Skip to content
Angular 6 - HttpClient - Semantic UI Demo
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
data
e2e
src
.editorconfig
.gitignore
LICENSE
README.md
angular.json
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

Angular 6 HTTP App

This is a demo app for ng-book that demonstrates how to use the HttpClient Module. The app requires access to jsonplaceholder.typicode.com API to function. The app can also be configured to use a local json-server.

This project was generated with Angular CLI version 6.0.7.

Requirements

Installation Steps

  1. Clone repository
  2. Run npm install
  3. Start app with npm start or ng serve
  4. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Take note that the responses returned by the online REST service are fake i.e. data won't actually be persisted.

To run locally, install the following json-server globally:

npm install -g json-server

Start the json-server first: json-server --watch data/db.json. Then start the Angular app using a local environment like this ng serve -c local. This will make the application use data from the local json-server API. In this mode, data will be persisted in the data/db.json file.

License

The MIT License (MIT) Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.