1

When a generate The dist directory with angular cli i need put this in root directory of server for example:

Localhost:8080/

For run correctly The angular 2 app

But if i want put in other directory how for example:

Localhost:8080/dist I got error in js files because The app find this in / root Rute

Any ideas how change The contexto path??

Thanks

4
  • you config files? Commented Apr 5, 2017 at 23:43
  • Is The default of any angular cli angular app Commented Apr 5, 2017 at 23:48
  • firstly why do you want to modify that ? Commented Apr 5, 2017 at 23:57
  • For localhost/angularapp1 localhost/angularapp2 but angular cli dist directory onlyworks in root Commented Apr 5, 2017 at 23:59

1 Answer 1

4

in Angular 2 app not working on Apache HTTP Server supergirl recommend change the base ref in index.html and yes this works

 <base href="./">

Update : this problem resolve but with bug in path large produce The same error 404 in refresh page

Sign up to request clarification or add additional context in comments.

Comments