刷新页面时,Angular 8使用nginx显示404

问题描述

在Angular 8应用程序中,刷新页面时,它会加载404。如果单击应用程序中的URL,则路由将按预期工作。我正在使用Nginx作为Web服务器。 我正在使用lazyloader模块。

我的路线:

const routes: Routes = [
  {
    path: '',redirectTo: 'dashboard',pathMatch: 'full'
  },{
    path: 'dashboard',loadChildren: () => import('./core/components/my-dashboard/dashboard.module').then(m => m.DashboardModule),canActivate: [AppGuard]

  },{
    path: 'orders',loadChildren: () => import('./core/components/orders-page/orders.module').then(m => m.OrdersModule),canActivate: [AppGuard]
  },

请帮助我在Nginx方面进行此工作。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)