我正在转向 angularjs (1.2) 的最新版本,现在看来我不能在转发器中包含模板:
http://plnkr.co/edit/K7n9sNhXe4z99VMSqTlk?p=preview
我可以将指令与 templateUrl 一起使用,但有没有办法只使用 ng-include 来做到这一点?
谢谢。
注意:这适用于最新的稳定 angularjs 版本(1.0.7)
编辑:每个重复元素的错误日志(最新的 Chrome 版本):
TypeError: Cannot call method 'insertBefore' of null
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:3321:22
at forEach (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:199:18)
at Object.enter (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:3320:9)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:15947:24
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:6277:11
at wrappedCallback (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:9042:59)
at wrappedCallback (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:9042:59)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:9128:26
at Object.Scope.$eval (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:9953:28)
at Object.Scope.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:9809:23)