0
我正試圖創建一個聚合物的電子應用程序。我試圖導入一個自定義元素使用電子與進口(聚合物)
<link rel="import" href="src/lux-app.html">
但它沒有工作。控制檯說:
GET file:///D:/src/lux-app.html net::ERR_FILE_NOT_FOUND
它沒有使用正確的路徑。我研究並發現,只有在服務器上(例如localhost),導入才能工作。有沒有辦法在電子或類似的東西中運行localhost?
謝謝
編輯: 這裏是文件結構
lux-app
|── bower_components
|── images
|── lib
└── artnet.js
|── lux-app.html
|── .gitignore
|── bower.json
|── ...
node_modules
└── node stuff
main.js
index.html
polymer.json
package.json
README.json
renderer.js
它的工作,但我不得不刪除<基地HREF =」 /「>和。非常感謝! –