Angular & Dependency Injection: tricks with Decorators

Every Angular developer knows about its awesome Dependency Injection system… but not everyone knows all of its features! Let’s take a look at some interesting tricks which might come in handy!

Parameter Decorators

In Angular, thanks to TypeScript, we have multiple types of decorators, the most known are:




Angular GDE, Founder of

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

10 Important Topics of ES6 — JavaScript


Error: Objects are not valid as a React child (found: object with keys {}).

Build a Photo Booth App in JavaScript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michele Stieven

Michele Stieven

Angular GDE, Founder of

More from Medium

Angular: How to Create Your Own Custom Reusable Dropdown with Text Wrapping Options

Catch every request error in Angular

How to Combine Add and Edit Forms in Angular

Hasura, GraphQL, and Auto Code Generation With Angular