Skip to content

Instantly share code, notes, and snippets.

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 }
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