【发布时间】:2013-10-24 20:34:05
【问题描述】:
我正在像这样使用 Angular 的 ng-include:
主要的html:
<span ng-include="'tpl.html'" ng-controller="TplCtrl" onload="loadMe()"></span>
模板tpl.html:
<h2>{{ tplMessage }}</h2>
控制器:
$scope.loadMe = function () {
$scope.tplMessage = 'template';
}
})
这在 angularjs 1.1.5 中运行良好,但在 1.2.0 rc 3 中不再运行
这是一个 plunkr : http://plnkr.co/edit/zYRevS?p=preview
知道如何使用 1.2.0 进行这项工作吗?
编辑: 我看到了这个:https://github.com/angular/angular.js/issues/3584#issuecomment-25279350 但在这里找不到这个问题的答案。
【问题讨论】:
标签: angularjs