我试图在Firebase上部署angular2应用程序。我遵循this指南,但是当我输入firebase open
时,出现错误(请参阅下文)。在Firebase上部署Angular2应用程序
这是
\root
\ app
\ assets
\ dev
\ node_modules
\ public
\ src
\ typings
index.html
firebase.json
gulpfile.js
package.json
tsconfig.json
typings.json
我已经把所有的文件我app
文件夹中的我的应用程序的结构(他们.js
文件,从.ts
那些它们dev
文件夹中transpiled)公共文件夹内。我也复制了公共文件夹中的index.html文件。
所以现在公共文件夹结构是:
\public
\app
|-> app.component.js
|-> boot.js
|-> other .js files
index.html
这是index.html的:
<html>
<head>
<base href="/">
<title>Angular 2 Boilerplate</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Load libraries -->
<!-- IE required polyfills, in this exact order -->
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="node_modules/angular2/bundles/http.js"></script>
<link rel="stylesheet" href="src/css/app.css">
</head>
<body>
<my-app>Loading...</my-app>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
</script>
</body>
</html>
我firebase.json是这样的:
{
"firebase": "wetta",
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
错误,谷歌镀铬控制台shows is: (index):24 Uncaught ReferenceError: System is not defined
我正朝着正确的方向走吗?什么导致了这个错误?