cannot instantiate instance of service in angular 10 when using injector.get code example
Example: how to inject service in component angular 6
you can inject service in components constructor:
constructor(public anyService: Service){}
you can inject service in components constructor:
constructor(public anyService: Service){}