AngularJS错误未终止

时间:2015-03-27 22:13:32

标签: angularjs

错误:[$ parse:lexerr] http://errors.angularjs.org/1.3.9/ $ parse / lexerr?p0 =未终止%20quote& p1 = s%205-6%20%5B%22%5D& p2 =查询%22

它抱怨的是:

<div ng-include=" 'templates/header.html' "></div>    

我试过了:

<div ng-include="'templates/header.html'"></div>
<ng-include src=" 'templates/header.html' "></ng-include>

我不明白,它看起来对我来说。

错误:[$ parse:lexerr] http://errors.angularjs.org/1.3.9/ $ parse / lexerr?p0 =未终止%20quote&amp; p1 = s%205-6%20%5B%22%5D&amp; p2 =查询%22     在错误(本机)     在http://localhost:8080/js/angular.min.js:6:416     at gc.throwError(http://localhost:8080/js/angular.min.js:185:475)     at gc.readString(http://localhost:8080/js/angular.min.js:188:195)     在gc.lex(http://localhost:8080/js/angular.min.js:183:433)     在hb.parse(http://localhost:8080/js/angular.min.js:188:443)     at $ get(http://localhost:8080/js/angular.min.js:111:7)     在新的cg(http://localhost:8080/js/angular.min.js:220:57)     at Object.e [as invoke](http://localhost:8080/js/angular.min.js:37:96)     at $ get.z.instance(http://localhost:8080/js/angular.min.js:76:210

1 个答案:

答案 0 :(得分:0)

这对我来说很好用

 <div ng-include src="'templates/header.html'"></div>