From the course: Angular Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Angular services and the injectable decorator - Angular Tutorial
From the course: Angular Essential Training
Angular services and the injectable decorator
- Angular services are a way to separate and reuse code across different parts of your application. You don't need to use services to use Angular but I've seen them in every project I've worked on and all Angular developers should be familiar with how they work. Services work best for things that don't change the UI directly. This might be things like API calls or complex calculations. This keeps your components small and focused only on showing data in the UI. Services are also flexible. You can inject services into other services. You can inject services into components. You can inject services into the entire app or only into one or two specific places. The choice is yours. Services and Angular Dependency Injection are closely linked. You can't use one without the other. In this video, we'll look at a common pattern for building and using services. We'll look at Dependency Injection in detail later in this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Overview of Angular pipes2m 11s
-
(Locked)
Using built-in Angular pipes4m 54s
-
(Locked)
Using custom Angular pipes4m 39s
-
(Locked)
Angular services and the injectable decorator2m 54s
-
(Locked)
Angular service classes5m 43s
-
(Locked)
Angular directive decorator2m 45s
-
(Locked)
Angular directive classes4m 17s
-
(Locked)
-
-
-
-
-