The reason is because your web server is already processing the url and therefore it is not delegated to the Angular2 router. To overcome this, you must use a different LocationStrategy in Angular.
What you are looking for is called HashLocationStrategy to create routes like /page1/app/#/angular-controller/ , where /page1/app/ served from a web server and /angular-controller/ is the first argument of your logic Angular2 applications.
Adjust module declaration (e.g. app.module.ts )
import {Component, NgModule} from '@angular/core'; import { LocationStrategy, HashLocationStrategy } from '@angular/common'; @NgModule({ providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}] }) class AppModule {}
You can learn more about this in the Angular2 documentation (an example was also taken).
source share