How to set application context path in angular2 routing properly?
Use this option to create build
ng build --base-href .
base href works everywhere.
See Example where i hosted on xampp :
Standard host - ng build --base-href http://www.yourwebsitehere.com/
. Make sure to remember the trailing slash
NodeJS host - ng build
. Make sure to setup your NodeJS server properly though