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

Production Build Routes Require 2 Clicks To Render Parent-Child Components #190

Closed
manavsehgal opened this issue Jan 4, 2016 · 10 comments
Closed

Comments

@manavsehgal
Copy link

This is a weird issue. I have added another set of parent-child components with routes configured as prescribed in starter. Works fine when I am running dev server (npm start).

However when I build:prod and serve:prod, the routes seem to require 2 clicks to show up content beyond first parent component referred to in the route. The first click seems to render only parent component until @Input() is triggered to get child components on second click!

Anyone else facing this issue?

@PatrickJS
Copy link
Owner

that's normal see angular/angular#6160

@manavsehgal
Copy link
Author

Thanks for linking the issue with main angular repo. I am reading more issues of similar nature to get grips on this one. There needs to be a workaround, otherwise we cannot have a situation where nested components are not allowed using routes to parent. Will keep this thread updated with my findings.

@PatrickJS
Copy link
Owner

can you push the repo to github so I can see what you're doing?

@manavsehgal
Copy link
Author

My main repo has a lot of unrelated code. I will setup something with simple parent-child components so we can focus on the problem. It will also help us test and isolate the issue.

@PatrickJS
Copy link
Owner

yeah that would be awesome 👍

@manavsehgal
Copy link
Author

Ok. Hope I have done this correctly. I have created a fork of your repo and pushed a new branch with sample code. [Repo removed]

I can replicate the above mentioned issue in this simple example.

@PatrickJS
Copy link
Owner

I'm installing it now

@PatrickJS
Copy link
Owner

@manavsehgal can you remove the CommonsChunkPlugin for common then it should work

@manavsehgal
Copy link
Author

Yes it works now. Many thanks.

@PatrickJS
Copy link
Owner

the problem was how CommonsChunkPlugin and the order the polyfills were loaded from what I can see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants