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

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

spark - pyspark reading from excel files