Skip to content

Instantly share code, notes, and snippets.

@anytizer
Last active November 7, 2022 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anytizer/05320094bad2bb36855d31f6abf25070 to your computer and use it in GitHub Desktop.
Save anytizer/05320094bad2bb36855d31f6abf25070 to your computer and use it in GitHub Desktop.
Angular Routes with path match and default match
const routes: Routes = [
{path: '', redirectTo: "home", pathMatch:"full"},
{path: 'home', component: HomeComponent, title: ''},
{path: 'dashboard', component: DashboardComponent, title: ''},
{path: 'login', component: LoginComponent, title: ''},
{path: 'logout', component: LogoutComponent, title: ''},
{path: '**', component: PagenotfoundComponent, title: ''},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment