---
title: "Discussion on \"Using dependency injection functions instead of constructors\" | Hashnode"
description: "Discussion on \"Using dependency injection functions instead of constructors\". Introduction\nStarting in Angular 14, we can use the new inject function in components, directives and pipes. There are several benefits in using this approach as it significantly improves the readability and reusability of our code.\nFor example, inst..."
url: "https://hashnode.com/posts/using-dependency-injection-functions-instead-of-constructors/63341ef38cddbf7cbd29b1f5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using dependency injection functions instead of constructors](https://alexroutledge.hashnode.dev/using-dependency-injection-functions-instead-of-constructors?utm_source=hashnode&utm_medium=feed)

Introduction Starting in Angular 14, we can use the new inject function in components, directives and pipes. There are several benefits in using this approach as it significantly improves the readability and reusability of our code. For example, inst...

Sep 28, 2022 · 2 min read · alexroutledge.hashnode.dev  
Read the article

-   [#angular](https://hashnode.com/tag/angular)
-   [#angular-2](https://hashnode.com/tag/angular-2)
-   [#rxjs](https://hashnode.com/tag/rxjs)
-   [#angular14](https://hashnode.com/tag/angular14)
-   [#angular-14](https://hashnode.com/tag/angular-14)

## Written by

[Alex Routledge](https://hashnode.com/@alexroutledge)

@alexroutledge

  
[View profile](https://hashnode.com/@alexroutledge)

Frontend Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
