[英]angular2 -set up getting error as `Uncaught ReferenceError: System is not defined`
I am trying to setup the angular2
app with my local system. 我正在尝试使用本地系统设置
angular2
应用程序。 without using any feeds
. 不使用任何
feeds
。 but i am getting error as Uncaught ReferenceError: System is not defined
- but systemjs
folder is there, is there in my moulde folder. 但是由于
Uncaught ReferenceError: System is not defined
我没有得到Uncaught ReferenceError: System is not defined
-但systemjs
文件夹在那里,在我的moulde文件夹中。
what is wrong with my set-up here? 我在这里的设置有什么问题?
here is my html file : 这是我的html文件:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A2-App</title>
<link rel="stylesheet" href="styles/global.css">
</head>
<body>
<hello-app>Loading...</hello-app>
</body>
<!-- ES6-related imports -->
<script src="js/node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="js/node_modules/es6-shim/es6-shim.js"></script>
<script src="js/node_modules/systemjs/dist/system.js"></script>//file exist there, but getting 404
<script>
//configure system loader
System.config({defaultJSExtensions: true});
</script>
<script src="js/node_modules/rxjs/bundles/Rx.js"></script>
<script src="js/node_modules/angular2/bundles/angular2.min.js"></script>
<script>
//bootstrap the Angular2 application
System.import('dist/app').catch(console.log.bind(console));
</script>
</html>
I think that the problem comes from the version of SystemJS you use. 我认为问题出在您使用的SystemJS版本。 Here are the versions:
这些是版本:
And include it this way: 并以这种方式包括它:
<script src="node_modules/systemjs/dist/system.src.js"></script>
See this page for more details: 请参阅此页面以获取更多详细信息:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.