base href换成如下script标签
<!-- <base href="/"> -->
<script>
document.write('<base href="' + document.location + '" />');
</script>
在app.module.ts下添加 { provide: LocationStrategy, useClass: HashLocationStrategy }
providers: [
HttpErrorHandler,
httpInterceptorProviders,
CookieService,
{ provide: NZ_I18N, useValue: zh_CN },
{ provide: RequestCache, useClass: RequestCacheWithMap },
{ provide: RouteReuseStrategy, useClass: CustomReuseStrategy },
{ provide: LocationStrategy, useClass: HashLocationStrategy }
]
搞定!