Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created August 18, 2018 22:05
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 gdyrrahitis/db6c1a6b067ec67ce0d4cca05ef3ab5a to your computer and use it in GitHub Desktop.
Save gdyrrahitis/db6c1a6b067ec67ce0d4cca05ef3ab5a to your computer and use it in GitHub Desktop.
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'pets', component: PetsComponent, canActivate: [AuthGuard] },
{ path: 'login', component: AuthComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment