【发布时间】:2016-08-24 15:48:30
【问题描述】:
我一直在尝试解决这个问题;我的目标是在 Aurelia 框架中使用 Polymer 模块。有一个教程here(在官方文档上),但这不适用于 CLI 生成的应用程序。
我的 aurelia.json 文件具有以下依赖项:
…
"aurelia-html-import-template-loader",
"aurelia-polymer",
…
(使用 npm 安装)
index.html 文件如下所示:
<head>
<title>Aurelia</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
…
我在构建时在 CLI/控制台中没有错误。
main.js
aurelia.use.plugin('aurelia-polymer');
加载正常,但是
aurelia.use.plugin('aurelia-html-import-template-loader');
在浏览器控制台中给出错误:
vendor-bundle.js:21513 GET http://localhost:9000/app.html
Unhandled rejection Error: Load timeout for modules: template-registry- ………
我一直在与 aurelia/gitter 上的一群小伙子交谈,但到目前为止,我发现没有人能够让 'aurelia-html-import-template-loader' 在 CLI 中工作。
感谢阅读, 度过美好的一天
【问题讨论】:
标签: javascript web aurelia