Top "Angular2-di" questions

Getting instance of service without constructor injection

I have a @Injectable service defined in bootstrap. I want to get the instance of the service without using constructor …

angular angular2-di angular2-injection
How do I inject a parent component into a child component?

I'm trying to inject a parent component into a child component. I thought this would be straightforward – simply specify/inject …

angular angular2-di
How to use Dependency Injection (DI) correctly in Angular2?

I have been trying to figure out how the (DI) Dependency Injection work in Angular2. I ran into lots of …

angular angular2-services angular2-di
Angular 2 Di not working - cannot resolve all parameters for

I've created a simple Hello World app that works fine. But when I want to add a "Service" just a …

angular angular2-di
Angular2 passing function as component input is not working

I've a component that takes function as input. I've passed this function from parent. Though the function is called, the …

angular angular2-template angular2-di
Angular 2 - Singleton Services?

In Angular 1 I frequently used factories for services to store shared state accessible by many components. It looks like in …

angular angular2-di
How to add providers to Injector dynamically?

Each component can specify new Providers using its providers property in ComponentMetadata. Is there a way to specify providers dynamically …

javascript angular angular2-di