useClass vs useExisting

Viewed 17372

When should we use useExisting provider instead of useClass?

providers: [
{provide: Class1, useClass: Class1}, 
{provide: Class2, useExisting: Class2}]

REMARK: I have not found an exact question on SO. And for better indexing decided to create this specific one here, although I found this answers:

but would like to have more real examples

3 Answers
Related