0

Background: I have an Angular site that uses multiple languages

Default: /desktop/

English: /en/

Spanish: /es/

Problem:I am unable to load certain javascript files for the /en/ or /es/ , but they load fine when running it on /desktop/ (I used the following SO article to get to this point: Failed to Load. I have also viewed: this thread. This seems different as it is not just one site configuration pointing to the wrong folder, I have multiple sites(languages)

Details: My "desktop" batch file has the following:

cd program-Desktop
call ng serve --base-href "/desktop/" --deploy-url "/desktop" --configuration=local-en

For the "en" site batch file, I have tried:

call ng serve --base-href "/en/" --deploy-url "/desktop" --configuration=local-en

and

call ng serve --base-href "/en/" --deploy-url "/en" --configuration=local-en

Actual Result: However I still get errors like:

GET http://localhost:4200/desktop/assets/js/Scripts/jquery-2.1.1.js

net::ERR_ABORTED 404 (Not Found)

Note: This works fine in REL & PROD. But having trouble in LOCAL

Question: I'm not sure why it's still looking in /desktop when I told it /en. If I go to the address at /en/ I can see the js file there, so why is it still looking for it in /desktop?

seesharp
  • 101
  • 1
  • 14

1 Answers1

0

Inside the index.html file, it tells the Angular program where to look for the javascript files. This needed to be updated to the appropriate URLs for each JS file (when switching from en to es for example, update the references from /en/ to /es/

seesharp
  • 101
  • 1
  • 14