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

404 when trying to http a json #326

Open
phil123456 opened this issue Mar 30, 2017 · 4 comments
Open

404 when trying to http a json #326

phil123456 opened this issue Mar 30, 2017 · 4 comments

Comments

@phil123456
Copy link

Hi,

my former code allowed me to http a json but now I use this seed, I get 404's

I am not sure if it is a webpack issue or something

this.http.get('app/translations/en.json') does not work anymore

any hint/help ?

thanks

@phil123456
Copy link
Author

phil123456 commented Mar 30, 2017

stupid of me, I have put things in "public" folder, now it's working

@maxx0r
Copy link

maxx0r commented Mar 30, 2017 via email

@phil123456
Copy link
Author

yes I did that too

but I try to debug it and I cant see the ts files in chrome, I cant open any files, wonder if the .map files went through

@phil123456
Copy link
Author

phil123456 commented Mar 30, 2017

adding # did the trick...(I think)
it's an issue with that version of webpack
webpack/webpack#2145
(not sure since I am a complete angular noob)

 if (isProd) {
    config.devtool = '#source-map';
  }
  else if (isTest) {
    config.devtool = '#inline-source-map';
  }
  else {
    config.devtool = '#eval-source-map';
  }

[edit: just checked without the # and I can see the sources, wtf...]

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