3 回答

TA贡献1856条经验 获得超5个赞
只需卸下底座从标签的index.html就是这样
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular App</title>
<base href="/">
Some more code
Don't do anything to this
删除后,您的代码将如下所示
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular App</title>
Some more code
Don't do anything to this

TA贡献1842条经验 获得超21个赞
根据我们的讨论,您说您尚未设置URL重写规则。
根据用于承载应用程序的内容,您需要设置URL重写规则。
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
NGinx:
try_files $uri $uri/ /index.html;
- 3 回答
- 0 关注
- 349 浏览
添加回答
举报