12 lines
500 B
TypeScript
12 lines
500 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';
|
|
|
|
export const routes: Routes = [
|
|
{ path: 'login', component: LoginComponent },
|
|
{ path: 'home', component: HomeComponent },
|
|
{ path: '', redirectTo: 'login', pathMatch: 'full' }, // 👈 Redirect root to /landing
|
|
{ path: '**', redirectTo: 'login' } // 👈 Optional: catch unknown routes
|
|
];
|