Quando passo o path completo, exemplo: user/flavio da erro: GET http://localhost:4200/user/runtime.js net::ERR_ABORTED 404 (Not Found) flavio:12 GET http://localhost:4200/user/polyfills.js net::ERR_ABORTED 404 (Not Found) flavio:12 GET http://localhost:4200/user/styles.js net::ERR_ABORTED 404 (Not Found) flavio:12 GET http://localhost:4200/user/vendor.js net::ERR_ABORTED 404 (Not Found) flavio:12 GET http://localhost:4200/user/main.js net::ERR_ABORTED 404 (Not Found) Nao acessa e nem cai no 404. Se eu mudar o path dentro do array routes para simplesmente user ou user-flavio ai funciona, parece acontecer quando do uso de mais de uma "/".
app.routing.module.ts:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'
import { PhotoListComponent } from './photos/photo-list/photo-list.component';
import { PhotoFormComponent } from './photos/photo-form/photo-form.component';
import { NotFoundComponent } from './errors/not-found/not-found.component';
const routes: Routes = [
{ path: 'user/flavio', component: PhotoListComponent },
{ path: 'p/add', component: PhotoFormComponent },
{ path: '**', component: NotFoundComponent }
];
@NgModule({
imports: [
RouterModule.forRoot(routes)
],
exports: [ RouterModule ]
})
export class AppRoutingModule{ }