比方说,我有这个在我的HTML:AngularJS指令使元素加倍?
<div my-doubling-directive>
... Lots of children here ...
</div>
我的指令运行后我想
... Lots of children here ...
... Lots of children here ...
所以基本上翻倍的输出,而不是离开的div指令是。我想我需要某种类型的链接方法transclude,但我卡住了。我已经看到了另一个通过过滤器实现这个功能的例子,但我现在将它作为自定义指令的学习示例。
使用指令transclusion可能是我需要借此下一步,使其动态多少次,最简单的方法 – pixelbits