0 votes
in Angular by

What are the differences between AngularJS and Angular with respect to dependency injection?

1 Answer

0 votes
by

Dependency injection is a common component in both AngularJS and Angular, but there are some key differences between the two frameworks in how it actually works.

AngularJS Angular

Dependency injection tokens are always strings Tokens can have different types. They are often classes and sometimes can be strings.

There is exactly one injector even though it is a multi-module applications There is a tree hierarchy of injectors, with a root injector and an additional injector for each component.

Related questions

0 votes
asked Nov 1, 2023 in Mean Stack by john ganales
0 votes
0 votes
asked Jul 5, 2022 in Angular by sharadyadav1986
...