Chrome 39会将已编译的DART应用程序显示为空白 [英] Chrome 39 renders a compiled Dart app as blank
问题描述
我使用Dart 1.8.3,Windows 8.1,Chrome 39.0.2171.95 m
I am using Dart 1.8.3, Windows 8.1, Chrome 39.0.2171.95 m
从档案建立范例Polymer应用程式
> 新建项目
对话框并选择 polymerapp
。它在Dartium工作正常。
Build a sample Polymer app from File
> New Project
dialog and chose polymerapp
. It works fine in Dartium.
编译为JS。在Firefox中工作正常,但只在Chrome中显示空白页面:
Compile to JS. Works fine in Firefox, but only shows a blank page in Chrome:
在这里搜索了一些相关主题,但仍然无处可去。将欣赏提示和指导。
Searched here for some relevant topics and still getting nowhere. Would appreciate hints and guidance.
推荐答案
我想这是因为您需要启动Chrome - allow-file-
I guess this is because you need to start Chrome with --allow-file-access-from-files
in order to be able or load local files.
或者尝试从 pub服务加载页面
Alternatively try to load the page from pub serve
which does Dart2JS compilation on the fly (launch the page from DartEditor and then copy the URL from Dartium to Chrome).
使用任何网络服务器Python simplehttpserver或在Dart中使用几行代码创建。
Use any web server Python simplehttpserver or create on in Dart with a few lines of code.
这篇关于Chrome 39会将已编译的DART应用程序显示为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!