'How to inject service with parameter and global service in constructor?
I have service which use service form global module and parametr.
@Injectable()
export class UsersService {
_paramentr;
constructor(
parametr,
GlobalService,
) {
this._parametr = parametr;
}
}
How to inject UsersService to AnotherService with paramentr.
I know, I can do it by new UsersService, but inside UserService I can use anothore services, I must inject it from top level to deep into. It's not very convenient.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
