OpenSource For You

Dependency injection

-

AngularJS contains a built-in dependency injection mechanism. This is the key to making easily reusable and testable components. It is a software pattern that ensures references to other components are not created directly for the components. Instead of direct instantiat­ion, each component will get references required by other components. So there is no need to find the dependenci­es for components, as dependenci­es themselves are configurab­le. The applicatio­n will be divided into different components, which can be injected into each other. This makes your applicatio­n easily reusable, configurab­le and testable.

AngularJS contains the following core types of objects and components: Value Factory Service Provider Constant

Newspapers in English

Newspapers from India