question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use with angular-cli

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

Just me, not really aware of webpack configuration …

Current behavior I use angular-cli. So currently my architecture is something like

| src 
   | app
   | assets
      | i18n
         | fr.json
         | en.json

But I get the following error : Uncaught Response with status: 404 Not Found for URL: http://localhost:4200/i18n/fr.json

Expected/desired behavior Get my json file, what do I have to do ?

Please tell us about your environment: angular-cli#1.0.0-BETA-15

  • ng2-translate version: 2.5.0
  • Angular version: 2.0.0
  • Browser: Chrome
  • Language: TypeScript 2.0.2

Thanks for any help 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17

github_iconTop GitHub Comments

2reactions
MalliswariKulalacommented, Feb 10, 2017

@maxime1992 Thanks Maxime… I placed i18n folder in assets folder and have defined this configuration ‘new TranslateStaticLoader(http, ‘./assets/i18n’, ‘.json’)’ in app.module.ts.

It working now 😃

2reactions
cbeldacapcommented, Feb 10, 2017

@maxime1992 Hi, just solved it. The problem was that I had a http interceptor and was catching every single call to .json files, so no interceptor -> no problem. Thnx anyway!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI Overview and Command Reference - Angular
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command ......
Read more >
What is Angular CLI and how to do I use it? | Anexinet + Veristor
Using and Installing Angular CLI ... CLI has made the process very simple and quick to generate a new project to quickly begin...
Read more >
Working with Angular CLI - A Hands-on Guide to Angular
The Angular CLI provides us with all the required dependencies. Boilerplates take care of the webpack configuration, unit test configuration, and transpile ...
Read more >
Angular CLI | Angular Project Setup - GeeksforGeeks
Angular is a front-end framework which is used to create web applications. It uses typescript by default for creating logics and methods for ......
Read more >
Getting Started With Angular Using the Angular CLI
Step 1 — Installing the Angular CLI and Creating Your First Application · Step 2 — Running Your Angular Application in the Browser...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found