I have an existing django project where I serve static files on top of / static / path. I am porting part of the application to angular2 to be a specific mobile version of the site.
Adding <base href="/">to index.html loads the static files. www.example.com/main.js gets 404 here. Adding <base href="/static/">to index.html loads static files correctly, but when the application loads, it changes the url to / static / (I use routers), although my url should be / order /.
there is a way to use base href as / but adding a prefix to the script and style files using angular-cli
using version ng --version
@angular/cli: 1.0.0-rc.0
node: 6.9.1
os: win32 x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 2.4.9