Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.