Angular2 providers with useClass purpose


        Might be wondering what is the purpose the useClass construct as shown here
[{ provide: Logger, useClass: Logger }
This provides a way for Angular2 to find and use the proper class / providers. Think of it as a key / value matching approach. Some people uses mock logger service by specifying useClass : BetterLogger.

Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error