jspm.io正在远程搜索我的本地模块

时间:2015-06-04 04:56:45

标签: angular jspm systemjs

我有一个非常奇怪的问题。下面的代码工作正常。 但是,如果我将角度脚本更改为我的本地脚本。

突然间
System.import('components/app/app')

运行,它在jspm.io上搜索脚本,而不是我的本地。这是为什么?

<!doctype html>
<html>
  <head>
    <script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@@0.0.87/traceur-runtime.js"></script>
    <script src="https://jspm.io/system@@0.16.js"></script>
    <script src="https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"></script>
    <script>
        System.traceurOptions = {
          annotations: true,
          memberVariables: true,
          typeAssertions: false,
          types: true
        };
        System.config({
          baseURL: '/'
        });
    </script>
    <script src="/javascripts/libs/zone.js"></script>
    <script src="/javascripts/libs/long-stack-trace-zone.js"></script>
  </head>
  <body>
    @html.block('primary', function(model){
      <app></app>
    })
    <script>
      System.import('components/app/app').then(function(module) {
        // uncomment for debugging.
        // zone = zone.fork(Zone.longStackTraceZone);
        //return module.main();
      });
    </script>
  </body>
</html>

0 个答案:

没有答案