为什么我重新加载页面时网站坏了?

Why website is broken when i reload the page?

我使用 fuse 模板构建了一个 angular 项目。我做到了,但是当我重新加载页面时,网站坏了。这是错误输出:

服务器错误 404 - 找不到文件或目录。您要查找的资源可能已被删除、名称已更改或暂时不可用。

有人告诉我这是关于 app.module.ts 但我不知道如何修复它。谁能帮我解决这个问题? 这是我的 app.module 代码=>

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ExtraOptions, PreloadAllModules, RouterModule } from '@angular/router';
import { MarkdownModule } from 'ngx-markdown';
import { FuseModule } from '@fuse';
import { FuseConfigModule } from '@fuse/services/config';
import { FuseMockApiModule } from '@fuse/lib/mock-api';
import { CoreModule } from 'app/core/core.module';
import { appConfig } from 'app/core/config/app.config';
import { mockApiServices } from 'app/mock-api';
import { LayoutModule } from 'app/layout/layout.module';
import { AppComponent } from 'app/app.component';
import { appRoutes } from 'app/app.routing';

const routerConfig: ExtraOptions = {
    preloadingStrategy       : PreloadAllModules,
    scrollPositionRestoration: 'enabled'
};

@NgModule({
    declarations: [
        AppComponent
    ],
    imports     : [
        BrowserModule,
        BrowserAnimationsModule,
        RouterModule.forRoot(appRoutes, routerConfig),

        // Fuse, FuseConfig & FuseMockAPI
        FuseModule,
        FuseConfigModule.forRoot(appConfig),
        FuseMockApiModule.forRoot(mockApiServices),

        // Core module of your application
        CoreModule,

        // Layout module of your application
        LayoutModule,

        // 3rd party modules that require global configuration via forRoot
        MarkdownModule.forRoot({})
    ],
    bootstrap   : [
        AppComponent,
    ],
})
export class AppModule
{
}

尝试更新此行

RouterModule.forRoot(appRoutes, routerConfig),

RouterModule.forRoot(路线, { useHash: true })

import { HashLocationStrategy, LocationStrategy } from '@angular/common';
@NgModule({
    declarations: [...],
    imports: [...],
    providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
    bootstrap: [AppComponent],
})
export class AppModule {}