Aurelia应用程序位于子文件夹中

时间:2016-01-06 21:28:30

标签: aurelia

<div aurelia-app>
    <script src="~/jspm_packages/system.js"></script>
    <script src="~/config.js"></script>
    <script>
        System.import("aurelia-bootstrapper");
    </script>
</div>

上述功能非常好,但是当我尝试aurelia-app="/js/aurelia/app"时,我收到了控制台错误。

Error:
TypeError: m.configure is not a function

来自es6.promise.js中的这一行:

 if (handler) {
                if (!ok)
                  record.h = true;
                result = handler === true ? value : handler(value);
    result = handler === true ? value : handler(value);

不确定下面要更改哪些内容才能使其正常工作:

<div aurelia-app="/js/aurelia/app">
    <script src="~/jspm_packages/system.js"></script>
    <script src="~/config.js"></script>
    <script>
        System.import("aurelia-bootstrapper");
    </script>
</div>

1 个答案:

答案 0 :(得分:2)

您可能需要发布有关应用结构的更多信息,但请在config.js中尝试以下内容:

  paths: {
    "*": "js/aurelia/*",
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*"
  }

  <div aurelia-app>
    <script src="~/jspm_packages/system.js"></script>
    <script src="~/config.js"></script>
    <script>
        System.import("aurelia-bootstrapper");
    </script>
  </div>