dependency injection - How to create a reusable provider in Angular 4 -


i'm trying replace provider code object can imported components.

@component({   selector: 'my-selector',   templateurl: './my-selector.component.html',   styleurls: ['./my-selector.component.scss'],   providers: [     {       provide: ng_value_accessor,       useexisting: forwardref(() => someselectorcomponent),       multi: true     }   ] }) 

so, section:

{    provide: ng_value_accessor,    useexisting: forwardref(() => someselectorcomponent),    multi: true } 

would moved kind of class or , imported component like:

import { mycustomprovider } './core' 

is possible in angular2/4?


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -