MCQs > IT & Programming > Angular JS > What is the difference, if any, of the resulting code logic based on these two provider configurations? [{ provide: FormattedLogger, useClass: Logger }][{ provide: FormattedLogger, useExisting: Logger }];

Angular JS MCQs

What is the difference, if any, of the resulting code logic based on these two provider configurations? [{ provide: FormattedLogger, useClass: Logger }][{ provide: FormattedLogger, useExisting: Logger }];

Answer

Correct Answer: The useClass syntax tells the injector to make a new instance of Logger and bind that instance to the FormattedLogger token. The useExisting syntax refers to an already existing object instance declared as Logger.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Angular JS Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Angular JS Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it