I'm reading the ng-book
on angular 2 revision 47 page 250 and there is the following passage:
When we put the class itself into the list of providers like this:
providers: [ MyService ]
That is telling Angular that we want to provide a singleton instance of MyService whenever MyService is injected. Because this pattern is so common, the class by itself is shorthand notation for the following, equivalent configuration:
providers: [ { provide: MyComponent, useClass: MyComponent } ]
Is it a typo and what is meant should be:
providers: [
{ provide: MyService, useClass: MyService }
]
It's typo, since you can't use components as Providers, here's the official docs