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

OpenCover code coverage for .Net Core

Using Custom DLL with IronPython / Scripts

Android Programmatically apply style to your view