Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https 提示很明显:不能跨域访问。通过上面的错误提示,可以看到:使用ng-include指令的时候,会用到AJAX请求XMLHttpRequest 像ng-include这样的指令,必须要有web容器的支持。直接用浏览器打开的index.html,并没有...
因为模板名是字符串,要是单引号括起来,如果写成ng-include="tpl/tpl1" 会将tpl/tpl1解析成变量,导致引入无效。 2. 使用ng-include src="'url'" src属性中的地址不能跨域。ng默认只能是同一域名和http协议下的文件才能成功引入。这里涉及到跨域就不讨论了。 See the PenAngular ng-include学习by finley (@ma...