this is probably a newbie question, but I couldn't find any answers to it here or on angular documentation. Let's say I have a simple Angular application (the hero editor from the angular.io tutorial for instance) that I want to distribute without yet knowing under which path it will run on my webserver. It could be under:
- http://host.domain/foo/myapp/
- http://host.domain/foo/bar/myapp/
- etc... you get the idea
Put differently, I'd need the generated sources (the index.html and its angular associated js files) to be fully working under any path (I guess that's why relative path are for...) currently my generated sources only work if I put them at the root dir my server, because of the
<base href="/">
npm deploy has generated in the index.html probably...I tried naively to change it to
<base href="./">
in order that my browser interpret the path of the included JS files as relative to the index.html. With this, my browser correcly finds the JS files, however the angular app is no longer working (blank page...).
Any idea of what should be the proper "angular-way" of doing that?
Thanks for your help in advance!