Find out how to use Observables to delay UI updates when retrieving data from multiple servers for the same page of your Angular 2 application.
- [Instructor] Many applications…use multiple services at the same time…on the same page to display data like we are here.…Depending on your needs, it may be appropriate…to display the data from each service as it arrives.…When this is the case, you can easily create…multiple HTTP or JSONP requests…like we did earlier in this course…and each request will update the UI…as soon as a response is received.…When making multiple requests like this,…each request is independent and has no knowledge…of the status of the other requests.…
Sometimes it may be more appropriate to wait until…all REST services return data before updating the UI.…When this is the case, you can use the forkJoin method…that comes with the RxJS library…to wait until all requests return data…before updating the UI.…We start by importing the RxJS observable class…as well as the forkJoin method itself.…At the top of our file, we'll create a new import statement…and between the brackets, we'll import observable…from rxjs/…Observable.…
We'll create a second import statement…
- Overview of data storage options
- Saving and retrieving data from the browser
- Setting routes in the URL
- Using query strings and fragments instead of routes
- Saving and retrieving data from a server
- Working with user input
- Using JSONP instead of HTTP
- Why writing custom services is important
- Writing custom services for working with browsers and servers
Skill Level Intermediate
1. Getting Started
Application overview1m 39s
2. Data Storage Options
3. Storing Data in the Browser
4. Storing Data on a Server
5. Writing Custom Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.