I set up a local IIS and a application with a directory called test:
Then in my browser I browse to: "http://localhost/test"
I have a route for this:
const routes: Routes = [
{
path: '', pathMatch: 'full', component: LoginComponent
},
{
path: '**', redirectTo: ''
}
];
@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule {}
But when I arrive at the login page, the browser removes the "test" and just does the "http://localhost/" in the browsers address, which is wrong.
The browser also don't get the assets now as "test" is missing:
Just for information, when I build the app, I build it with --baseHref=/test/

enableTracing: truein yourforRootconfig and see if you can identify the problemdeployUrl?