需要 DART 服务器中的路由吗? [英] Routes in DART, s server required?

查看:26
本文介绍了需要 DART 服务器中的路由吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆