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

fix(find-lazy-modules): JSON parse error for loadChildren #1972

Conversation

chalin
Copy link

@chalin chalin commented Sep 4, 2016

Fixes #1891, #1960.

cc @filipesilva @ericjim - was failing for ng2.io, but this fixes the issue.

@ericjim
Copy link
Member

ericjim commented Sep 4, 2016

Nice find

@filipesilva
Copy link
Contributor

LGTM but @hansl can you weigh in?

@hansl
Copy link
Contributor

hansl commented Sep 5, 2016

This fix is faulty though since it replaces quotes regardless of context.

I think I know what's going on, might take a look at it tomorrow. Might just need to evaluate the code (or even better don't parse JSON since we shouldn't need to).

@hansl
Copy link
Contributor

hansl commented Sep 5, 2016

I already made a function to get the string value of the key of an object, the more I think about that line the clearer the fix is. Typescript gives us the string value of a string literal, I just need to use that. My bad for this horrible code in the first place.

I was young, and that was folly.

hansl added a commit to hansl/angular-cli that referenced this pull request Sep 5, 2016
and properly understand and return the modules in this case.

Also refactored that function to be clearer, and added a test to cover.
I made sure the test was failing before this PR ;)

Fixes angular#1891, angular#1960.

cc @filipesilva @ericjim @chalin - See similar
angular#1972
hansl added a commit to hansl/angular-cli that referenced this pull request Sep 5, 2016
and properly understand and return the modules in this case.

Also refactored that function to be clearer, and added a test to cover.
I made sure the test was failing before this PR ;)

Fixes angular#1891, angular#1960.

cc @filipesilva @ericjim @chalin - See similar
angular#1972
@filipesilva
Copy link
Contributor

Closed in favor of #1987

@filipesilva filipesilva closed this Sep 5, 2016
hansl added a commit that referenced this pull request Sep 6, 2016
)

* fix(find-lazy-modules): Allow for any valid keys/value to be used
and properly understand and return the modules in this case.

Also refactored that function to be clearer, and added a test to cover.
I made sure the test was failing before this PR ;)

Fixes #1891, #1960.

cc @filipesilva @ericjim @chalin - See similar
#1972

* cleanup
catull pushed a commit to catull/angular-cli that referenced this pull request Sep 6, 2016
…gular#1987)

* fix(find-lazy-modules): Allow for any valid keys/value to be used
and properly understand and return the modules in this case.

Also refactored that function to be clearer, and added a test to cover.
I made sure the test was failing before this PR ;)

Fixes angular#1891, angular#1960.

cc @filipesilva @ericjim @chalin - See similar
angular#1972

* cleanup
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular Cli 1.0.0-beta.11-webpack.8: ng build failed if route 'loadChildren'
5 participants