Add pathMatch: 'full'
{path: '', component: AppComponent, pathMatch: 'full'},
to routes with empty path '' and no child routes.
Add pathMatch: 'full'
{path: '', component: AppComponent, pathMatch: 'full'},
to routes with empty path '' and no child routes.