Sunday, May 01, 2016

Angular 2 HTTP JSON Service

Live Demo
Github Repo

Here is a bare minimum demo of how to use Angular 2 HTTP JSON Service:

The demo uses observable instead of promise. A few potential catches:
  • Import Rx.js in html file:
    <script src="node_modules/rxjs/bundles/Rx.js"></script>
  • Import rxjs/Rx in service:
    import 'rxjs/Rx'

No comments: