需要 DART 服务器中的路由吗? [英] Routes in DART, s server required?
问题描述
我尝试了 AngularDART 路由和 Polymer 路由,这个例子一个>
I tried both AngularDART routes, and routes with Polymer, this example
但是发现,一旦我直接从 Dartium 打开文件,就没有任何工作可以正常工作,但是一旦我从 Dart 编辑器中运行它们,它们都可以正常工作!
but found, that none is working once I open the file from Dartium directly, but both work perfectly once I run them from Dart editor!
我是不是做错了什么!
谢谢
推荐答案
我认为重点是使用了import html"文件,它可以在 web 服务器和一些浏览器上运行,例如路由在 Safari 浏览器上流畅运行,而不需要web 服务器,但在 Chrome 没有服务器的情况下无法运行,并且 Chrome 显示此错误消息:
I think the point is both using "import html" file, which can run with web server and some browsers,, for example route run smoothly at Safari browser without web server, but did not run without server at Chrome, and Chrome shows this error msg:
Imported resource from origin 'file://' has been blocked from loading by
Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null'
is therefore not allowed access.
这篇关于需要 DART 服务器中的路由吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!