Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(1.6.0) Cannot read property 'vcRef' of undefined in InjectionService code #82

Closed
alanpurple opened this issue Nov 15, 2016 · 5 comments
Labels

Comments

@alanpurple
Copy link

alanpurple commented Nov 15, 2016

EXCEPTION: Cannot read property 'vcRef' of undefinedErrorHandler.handleError @ core.umd.js:2834
core.umd.js:2839 ORIGINAL STACKTRACE:ErrorHandler.handleError @ core.umd.js:2839
core.umd.js:2840 TypeError: Cannot read property 'vcRef' of undefined
at InjectionService.getRootViewContainerRef (http://localhost:1337/lib/ng2d3/ng2d3.js:1322:53)
at InjectionService.appendNextToRoot (http://localhost:1337/lib/ng2d3/ng2d3.js:1337:29)
at TooltipDirective.injectComponent (http://localhost:1337/lib/ng2d3/ng2d3.js:2116:42)
at eval (http://localhost:1337/lib/ng2d3/ng2d3.js:2064:33)
at ZoneDelegate.invokeTask (http://localhost:1337/lib/zone.js/zone.js:265:35)
at Object.onInvokeTask (http://localhost:1337/lib/@angular/core/bundles/core.umd.js:5963:41)
at ZoneDelegate.invokeTask (http://localhost:1337/lib/zone.js/zone.js:264:40)
at Zone.runTask (http://localhost:1337/lib/zone.js/zone.js:154:47)
at ZoneTask.invoke (http://localhost:1337/lib/zone.js/zone.js:335:33)
at data.args.(anonymous function) (http://localhost:1337/lib/zone.js/zone.js:970:25)ErrorHandler.handleError @ core.umd.js:2840
Subscriber.ts:241Uncaught TypeError: Cannot read property 'vcRef' of undefined(…)

@alanpurple alanpurple changed the title (1.6.0) (1.6.0) Cannot read property 'vcRef' of undefined in InjectionService code Nov 15, 2016
@alanpurple
Copy link
Author

actually there is no "_hostElement" property in ComponentRef.
@angular/core 2.2.0

@alanpurple
Copy link
Author

I thinks this is due to change in angular 2.2.0, verified using plunker

@alanpurple
Copy link
Author

change in 2.2.0

AppElement -> ViewContainer

no "hostElement" property in ApplicationRef

@amcdnl
Copy link
Contributor

amcdnl commented Nov 15, 2016

This is a 2.2.0 breaking change angular/angular#9293

@amcdnl
Copy link
Contributor

amcdnl commented Nov 17, 2016

Fixed in 06bf502

@amcdnl amcdnl closed this as completed Nov 17, 2016
@amcdnl amcdnl added the Bug label Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants