我有这两个用于树视图的模板,我想使用第一种方法,但似乎有问题或者我错过了一些东西。
第一种方法(可取但不起作用)
TreeTemplate.html
<ul>
<li ng-repeat="node in c.model" style="list-style-type: none;" ng-include="'/_Core/DirectiveCore/Tree/NodeTemplate.html'">
{{node.text}} <!--It wont show up , the problem is here, any tags will not show up in result-->
</li>
</ul>
节点模板.html
<ul ng-if="node.nodes">
<li ng-repeat="node in node.nodes" style="list-style-type: none;" ng-include="'/_Core/DirectiveCore/Tree/NodeTemplate.html'">
{{node.text}}
</li>
<li></li>
TreeTemplate.html中的每一件事都不会出现ng-include
第二种方法(不可取但有效)
树模板.html
<ul>
<li ng-repeat="node in c.model" style="list-style-type: none;" ng-include="'/_Core/DirectiveCore/Tree/NodeTemplate.html'">
<!--there is not any tag here!-->
</li>
节点模板.html
{{node.text}}
<ul ng-if="node.nodes">
<li ng-repeat="node in node.nodes" style="list-style-type: none;" ng-include="'/_Core/DirectiveCore/Tree/NodeTemplate.html'">
{{node.text}}
</li>
</ul>
请帮我弄清楚发生了什么。