当尝试在ng-include模板中使用ng-transclude时,会抛出以下错误,
Error: [ngTransclude:orphan] Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: <ng-transclude>
我确实已将transclude: true
包含在指令范围内,
// directive1.html
<div>
<div ng-include="template.html">
</div>
// template.html
<div>
<ng-transclude></ng-transclude>
</div>