How does declaring a service in a component differ when done as a provider versus in the constructor?
When declared as a provider:
@Component({
...
providers: [MyService]})
Versus being declared in the constructor:
constructor(private myService: MyService) {
...
}
Is there a recommended approach between the two methods?