Error: Cannot match any routes. URL Segment: Error: Cannot match any routes. URL Segment: angular angular

Error: Cannot match any routes. URL Segment:


Add pathMatch: 'full'

{path: '', component: AppComponent, pathMatch: 'full'},

to routes with empty path '' and no child routes.


I am integrating Angular 2/4 into an existing MVC application, and I had this problem too.

Using your example, if I had path: 'Clients' in the routing config instead of path: 'clients' and tried to go to the URL such as http://localhost/clients, I would get this error.

The route path names are case sensitive (as of right now anyway). They won't match what's in your URL otherwise, and with typical MVC controller/action naming, they are "InitialCaps-style."


Check the imports session at the app.module.ts and look you did't miss the routing:

imports: [    BrowserModule,    APP_ROUTES,    AppRoutingModule  ],