Find out how to use Observables in your Angular 2 application to reduce network traffic and keep bandwith available for your server.
- [Teacher] Our application can now add,…remove, and update entries in our database.…And whenever we perform any action with the database,…we need to make a network request.…If we look at the Network tab in our developer tools,…we can see we're making network requests every time we…change the input or clear the filter using the Clear button.…It's good practice to keep the number…of network requests made to a minimum.…This ensure that we only send unique requests,…receive responses in the same order we requested them, and…keep network traffic low so we don't bottleneck the server.…
Let's add code to our user list component to watch for…changes in our filter input, and only make a network…request when the user stops typing in their new filter.…We start by importing the Subject class from rxjs/Subject.…At the top of our component file,…we'll create a new import statement.…Between the brackets, we'll import…the Subject class from rxjs/Subject.…Take note of the capitalization.…RXJS is a third-party library endorsed by Angular,…
- 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.