All Questions
Tagged with angular-dependency-injection angular8
5 questions
1
vote
2
answers
1k
views
Dependency inject components in Angular
Is it possible to somehow dependency inject components in Angular? I would like to be able to do something similar to what you can do with services e.g.:
my.module.ts:
providers: [
{
provide:...
0
votes
2
answers
117
views
How to specify angular service injection strategy?
I have service like folowing:
@Injectable({
providedIn: 'root'
})
export class BoxContainerService {
private boxBehaviour: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);
...
9
votes
1
answer
3k
views
Inject a service from a main project into a created library
I working with Angular 8.
This question is only for Angular DI experts.
At first, I made an Angular library that will be reused in many project.
In this Library, I made an abstract service, that ...
0
votes
1
answer
398
views
Angular 8 Import Service into Interface/Module
I have a service, called ConfigService in config.serivce.ts, i need to get a function (getClientID) that returns a value and import this value into a module file: appAuth.module.ts
I need to know how ...
0
votes
1
answer
3k
views
Transitively inject injection token into a service defined in library, used within an angular application
I've created an angular library, say library1, which defines and exposes a service APIService. The APIService has a constructor argument (URL: string), which is injected with an Injection token ...