Angular使用loadChildren

const routes: Routes = [
  {
    path: "user",
    loadChildren: () => import("./module/user/user.module").then((mod) => mod.UserModule),
  },
  // { path: "**", redirectTo: "/" },

    ];//参考:https://angular.cn/api/router/Route#lazy-loading

Bookmark the permalink.

Comments are closed.