Top "Dependency-injection" questions

A design pattern to reduce coupling between components, by dynamically injecting into a software component dependencies that it needs to function.

What "things" can be injected into others in Angular.js?

I'm having a little hard time understanding Dependency Injection in Angular. So my question is, can anyone explain which of …

angularjs dependency-injection
ASP.NET Core 2 Unable to resolve service for type Microsoft EntityFrameworkCore DbContext

When I run my asp.net core 2 projects I get the following error message: InvalidOperationException: Unable to resolve service for …

c# dependency-injection asp.net-core asp.net-core-mvc asp.net-core-2.0
Difference between dependency injection and dependency inversion

Two design patterns namely Dependency Injection and Dependency Inversion exist out there, Articles are there in the net trying to …

php design-patterns dependency-injection dependency-inversion
Access to module config in Zend Framework 2

How I can get access to my module config from the controller?

php dependency-injection zend-framework2
Dependency injection in unit of work pattern using repositories

I want to create a unit of work class that wraps around repositories in a similar way to this. The …

c# entity-framework dependency-injection unit-of-work
Angular2 Inject ElementRef in unit test

I am trying to test a component that receives a reference to ElementRef through DI. import { Component, OnInit, ElementRef } from …

unit-testing angular dependency-injection angularjs-e2e
Spring: Using builder pattern to create a bean

I use ektorp to connect to CouchDB. The way to build an ektorp HttpClient instance is to use builder pattern: …

java spring dependency-injection inversion-of-control builder
Dependency Injection framework for C++

Is there a DI framework comparable to Google Guice? And what does Google use?

c++ dependency-injection
Factory method with DI and IoC

I am familiar with these patterns but still don't know how to handle following situation: public class CarFactory { public CarFactory(…

c# dependency-injection inversion-of-control factory-pattern
Self injection with Spring

I tried the following code with Spring 3.x which failed with BeanNotFoundException and it should according to the answers of …

java spring dependency-injection ioc-container