What is the use of inject decorator inside constructor?
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) {}