Services are used to share data and logic across multiple components. They pick up where components fall short. Without services, complex application would me much more convoluted to code, maintain, and test. Modularity is a great benefit of services. In this video Reynald, explains this and sets the stage to create a movie service.
- [Instructor] It's now time to talk about services.…Now, services are used to share data and logic…across multiple components, and they tend to pick up…where components fall short.…So whenever there's a big chunk of work to get done…in Angular, a lot of times, they're broken up…into different services.…Now, when the work tends to be a little bit less,…in layman's term, a component can generally handle it.…There's two ways to use a service.…Normally, a component can create an instance of a service,…and that works, but the down side is…that it's only it's only available locally.…
Another approach is to register the service with Angular,…which creates a single instance…that lasts the lifetime of the application for the service…and uses dependency injection to implement it.…Now, you may or may not have heard the term,…dependency injection.…It's a very common pattern in the world…of object-oriented programming,…but essentially, it's the process…of a class receiving instances of objects needed,…otherwise known as dependencies, from an external source.…
- 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.