我遵循了使用firebase部署Angular 6应用程序所需的所有步骤,并得到了空白页和错误消息: “选择器“ app-root”与任何元素都不匹配”
我部署的步骤:
./ dist / bookclub / index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bookclub</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.33d366f8ea713aeef660.css"></head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="polyfills.9f773b75ffcda6bb2a95.js"></script><script type="text/javascript" src="main.26ec44ceda27f0826914.js"></script></body>
</html>
./ firebase.json
{
"hosting": {
"public": "dist/bookclub",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
为什么Firebase无法找到应用程序根选择器?当我使用有角度的cli服务该应用程序时,效果很好。