14 lines
653 B
TypeScript
14 lines
653 B
TypeScript
import { Routes } from '@angular/router';
|
|
import { LoginComponent } from './login/login.component';
|
|
import { HomeComponent } from './home/home.component';
|
|
import {AuthGuard} from './service/auth.guard';
|
|
import { ActivityScreen } from './components/activity-screen/activity-screen';
|
|
export const routes: Routes = [
|
|
{ path: 'login', component: LoginComponent },
|
|
{ path: 'home', component: HomeComponent },
|
|
{path: 'screen' , component: ActivityScreen}, // 👈 Protected route
|
|
{ path: '', redirectTo: 'login', pathMatch: 'full' }, // 👈 Redirect root to /landing
|
|
{ path: '**', redirectTo: 'login' },// 👈 Optional: catch unknown routes
|
|
|
|
];
|