In this video, learn how to use the exercise files to make use of a mock HTTP backend service to be able to create HTTP calls but not have to connect to an actual backend service.
- [Instructor] To work with http calls from angular, … you typically need some sort of end point to call to. … But since angular has a powerful … dependency injection engine, … and the code base is built upon it, … we can actually leverage that to replace … angular's httpXhrBackend class … that handles the http calls … and set up a mock one to simulate those calls. … The project code has already been set up … with a mock class for that. … If you are interested in it, … feel free to check out the mock-xhr-backend.ts file … to see what it's up to. … This class is set up to support http calls … to the url mediaItems forget, post, and delete verbs. … It will allow us to build out the mediaItems service … to use angular's http service … while not requiring a separate API to hit. … And with angular's DI architecture, … the default httpXhrBackend class can be replaced … with this mock class. … Over in the app.module.ts file, … we need to import the type that we are going to mock. … The httpXhrBackend. …
- What is Angular?
- Working with components
- Binding events and properties
- Getting data to components
- Using directives and pipes
- Creating Angular forms
- Validating form data
- How Angular does dependency injection
- Making HTTP calls
- Styling components
Skill Level Intermediate
Angular: Building an Interfacewith Ray Villalobos2h 20m Intermediate
1. Architecture Overview
3. Directives and Pipes
5. Dependency Injection and Services
8. Styling Components
Next steps1m 20s
- 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.