N
N
Nikita2020-11-15 15:33:35
Angular
Nikita, 2020-11-15 15:33:35

Is Angular DI bad?

Angular does dependency injection through classes, is this killing the very idea of ​​DI? After all, we are binding to a file of a certain dependency, rather than using some kind of token for injection.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2020-11-16
@MiiZZo

So it works through tokens.
Through a class, this is a type of shortcut when a constructor function object is used as a token object in order to write less code. This is js, there are no classes here, they are all first-class entities

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question