- [Instructor] So now we are ready to use our observables,…but in order to do that, we need to subscribe.…So the first step is to go to our…movie-list.component.ts file.…Which I'm currently open to,…and within the ngOnInit method,…we are going to update that…because you'll notice that the compiler is complaining.…It doesn't recognize observables.…So we need to replace this to actually summon…the service by invoking the get movies method…on our service in order to obtain our collection of movies.…
So in short, what we're doing is we are subscribing…to the return observables.…We set out movies property to the returned array of movies.…The next thing we wanna do now is scroll on up…to the very top of the page,…and we are going to add a property for the error…under list filter property.…So right on line 20, let's hit enter,…and we'll drop a property called error message,…and it'll be of a type string.…
Afterwards let's go back to the ngOnInit method,…and right over here on line 33,…let's go ahead and add a comma at the end of movies.…
- Creating components
- Bootstrapping components
- Working with templates
- Using directives and interpolation
- Binding and transforming data
- Creating advanced and nested components
- Creating services
- Obtaining data with HTTP calls
- Configuring routes
Skill Level Intermediate
1. Course Overview
3. Directives, Interpolation, and Templates
5. Advanced Components
7. Obtaining Data with HTTP
- 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.