Node webkit app - 如果导航到本地文件系统,则未定义

时间:2018-04-04 12:58:04

标签: angular ionic3 nwjs

我创建了一个Ionic 3(A5)应用程序。我在Mac上运行它作为node-webkit(NW.JS)应用程序。如果我导航到本地文件系统' nw '不起作用。在package.json中说出类似的内容 - “main”:“file:////Users/Prasoon/Desktop/testnw/index.html”, nw 变得未定义,我无法访问任何内容节点Apis。有什么方法可以解决这个问题吗?

但是,如果我只是通过在package.json之外放置index.html来在package.json中使用“index.html”,那么一切正常。

1 个答案:

答案 0 :(得分:0)

基于Jared Wilcurt @TheJaredWilcurt在gitter.im

的回复

只有亲戚(../../../file.html),本地(localhost:1234)和远程(http://example.com)地址在“main”中工作:

我使用了 localhost:8100 ,而且一切正常!

相关问题