加载index.html时获取Zone.js相关的控制台错误

时间:2017-03-20 16:02:49

标签: angular

Error Image 以下是index.html代码

<html>
  <head>
    <title>Emp Profile</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="styles.css">
    <!-- 1. Load libraries -->
     <!-- Polyfill(s) for older browsers -->
    <script src="node_modules/core-js/client/shim.min.js"></script>
    <script src="node_modules/zone.js/dist/zone.js"></script>
    <script src="node_modules/reflect-metadata/Reflect.js"></script>
    <script src="node_modules/systemjs/dist/system.src.js"></script>
    <!-- 2. Configure SystemJS -->
    <script src="systemjs.config.js"></script>
    <script>
      System.import('app').catch(function(err){ console.error(err); });
    </script>
  </head>
  <!-- 3. Display the application -->
  <body>
    <my-app>Loading...</my-app>
  </body>
</html>

尝试访问http://localhost:3000/时收到以下错误,

Error: Uncaught (in promise): Failed to load %3Ch1%3E%20My%20first%20Employee%20app%20%3C/h1%3E at resolvePromise (http://localhost:3000/node_modules/zone.js/dist/zone.js:665:31) [<root>] at resolvePromise (http://localhost:3000/node_modules/zone.js/dist/zone.js:636:17) [<root>] at http://localhost:3000/node_modules/zone.js/dist/zone.js:713:17 [<root>] at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:166:47) [<root> => <root>] at drainMicroTaskQueue (http://localhost:3000/node_modules/zone.js/dist/zone.js:546:35) [<root>] at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:424:25) [<root>]

请查看随附的屏幕截图

0 个答案:

没有答案