1

I am trying to import "ComponentResolver"

import { Component, HostListener, ViewContainerRef, ViewChild, ComponentResolver } from '@angular/core';

And I have error:

Module '"/home/maksym/untill/trunk/unTill.Modern/Code/AppRc6/node_modules/@angular/core/index"' has no exported member 'ComponentResolver'.

My dependencies:

"@angular/common": "~2.0.1",
"@angular/compiler": "~2.0.1",
"@angular/core": "~2.0.1",
"@angular/forms": "~2.0.1",
"@angular/http": "~2.0.1",
"@angular/platform-browser": "~2.0.1",
"@angular/platform-browser-dynamic": "~2.0.1",
"@angular/router": "~3.0.1",
"@angular/upgrade": "~2.0.1",

How i cam fix this issue?

1 Answer 1

3

Since RC.6 2.0.0-rc.6 ComponentResolver was removed.

Per angular2 changelog

Use ComponentFactoryResolver together with @NgModule.entryComponents or ANALYZE_FOR_ENTRY_COMPONENTS provider for dynamic component creation.

Sign up to request clarification or add additional context in comments.

3 Comments

Have you example of using entryComponents?
See the first option from this answer stackoverflow.com/questions/39678963/…
Thanks, you really helped me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.