<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>
答案 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>