S SmartDocs
Chuỗi bài: angular typescript 18 dòng · Cập nhật 2026-02-03

app.routes.ts

angular/examples/week07-08/src/app/app.routes.ts

import { Routes } from '@angular/router';

export const routes: Routes = [
  {
    path: 'login',
    loadComponent: () => import('./login.component').then((m) => m.LoginComponent),
  },
  {
    path: 'customers',
    loadComponent: () => import('./customer-shell.component').then((m) => m.CustomerShellComponent),
  },
  {
    path: '',
    redirectTo: '/login',
    pathMatch: 'full',
  },
];

Bài viết liên quan