How do I list all the dependency injectors of a component in angular?
This requirement is for unit testing.
I have an instance of a component created as follows :
component = fixture.componentInstance();
So in my test case, I need something like
console.log(component.constructor.params) // should print all the constructor parameteres
For ex in the below code :
constructor(private _logger: LoggerService, private _router: Router,
private _adminService: AdminService) {
}
I need to fetch array of DI's
0 -> LoggerService
1 -> Router
2 -> AdminService