What is the use of inject decorator inside constructor?

857    Asked by SallyLangdon in Python , Asked on Jan 23, 2020
Answered by Sally Langdon

It means that angular will handle automatically and internally the instance creation for the factoryResolver.

In latest versions of angular we don't need to specify the @Inject in the constructor, nor the assign to this.factoryResolver:

constructor (private factoryResover: ComponentFactoryResolver) {}



Your Answer

Interviews

Parent Categories