Find out how to use REST requests in your Angular 2 application to get and set data in a CouchDB server.
- [Instructor] Let's modify our onFilter method…to update the user settings document in our database…whenever a user updates or clears the filter in our UI.…We do this by going into our onFilter method,…creating a new line and typing…this.xyzWebStorageService.setRemote.…The setRemote method takes a single argument,…which is the payload we want to send back to the server.…The payload must include the new filter value,…as well as the current revision number of the record…we want to update, like this:…filter is equal to this.filter,…and underscore rev is equal to this.settings._rev.…
Depending on when and how we've updated…the database documents, Couch DB either sends back…the underscore rev property, or the rev property…without an underscore.…We'll account for both properties now by using…a ternary operator.…If the underscore rev property exists,…we'll use the underscore rev property.…Otherwise...…Use the rev property without the underscore.…We then subscribe to the response,…updating our this.settings property with the new…
- Analyzing Angular 2 error messages
- Identifying the causes of common error messages
- Preventing common errors with custom error handling
- Analyzing testing reports
- Reviewing common testing report errors and their likely causes
Skill Level Intermediate
Q: This course was updated on 10/30/2018. What changed?
A: The following topics were updated: common Angular 2 errors—including dependency injection errors—and testing Angular 2 apps.
Angular Essential Trainingwith Justin Schwartzenberger2h 48m Intermediate
Angular 2: Widget-Based Architectureswith Derek Peruo52m 18s Intermediate
1. Getting Started
Application overview1m 49s
2. How Angular 2 Reports Errors
Error handling in Angular1m 21s
3. Common Angular 2 Errors
4. Testing Angular 2 Applications
- 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.