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

The specified initialization vector (IV) does not match the block size for this algorithm