0
实施例加载模板:
registry.html
<label>Name:</label>
app.js
define(['angular', 'services','text',
'text!ang/templates/registry.html'], function(angular, services,textmod,template) {
........
angular.module('myApp.directives', ['myApp.services'])
.directive('superd', function() {
return {
templateUrl:template,
..........
}
})
Eror:
GET app_ang /%3Clabel%3名称: %3C /标签%3E 403(禁止) angular.js胸围= 1417672731204137.41101580671966:10023
错误:[$编译:tpload]未能加载模板:<label>Name:</label>
注: '文本' 是https://github.com/requirejs/text
什么是 “模板” 在你的指导值?它是动态的,那么从哪里来的价值? – Asik 2014-12-04 06:16:17
我编辑过文章.... – 2014-12-04 06:19:18
您是否尝试直接在浏览器中访问该页面?另外,请查看请求的萤火虫并复制该网址并直接在浏览器中点击? – Asik 2014-12-04 06:24:59