Skip to main content

Services & Dependency Injection

Learn Services & Dependency Injection (Angular Core Concepts, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Services & Dependency Injection (DI) A Service is a plain TypeScript class that holds logic/data meant to be shared across components (e.g. an API client). Angular's DI system automatically creates and supplies (injects) a service instance to any component that asks for it in its constructor - you never call new yourself.

More lessons in Angular Core Concepts