feat: Implement Login and Logout functionality, protect authenticated routes #12
@ -1,13 +1,17 @@
|
|||||||
import { Routes } from '@angular/router';
|
import {Routes} from '@angular/router';
|
||||||
import {LandingPageComponent} from "./landing-page/landing-page.component";
|
import {LandingPageComponent} from "./landing-page/landing-page.component";
|
||||||
import {HomepageComponent} from "./homepage/homepage/homepage.component";
|
import {HomepageComponent} from "./homepage/homepage/homepage.component";
|
||||||
|
import {authGuard} from "./auth.guard";
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: '',
|
||||||
component: HomepageComponent
|
component: LandingPageComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'home',
|
||||||
|
component: HomepageComponent,
|
||||||
|
canActivate: [authGuard],
|
||||||
},
|
},
|
||||||
|
|
||||||
{ path: '', component: LandingPageComponent }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user