如果 transclude: false,这里的嵌入如何工作?
How does the transclusion work here if transclude: false?
我正在尝试了解有关高级自定义指令的更多信息,并且我正在查看以下源代码:
https://github.com/dpiccone/ng-pageslide/blob/master/dist/angular-pageslide-directive.js
我注意到第 11 行 transclude: false,
但是,此指令包含在 div 周围。
嵌入是如何完成的?
给出的例子是这样的:
<div ... ng-controller="yourCtrl">
...
<pageslide ps-open="checked">
<div>
<p>some random content...</p>
</div>
</pageslide>
...
</div>
不使用template
as well. This means that <pageslide>
children elements are still available in link, and they can be manipulated。
我正在尝试了解有关高级自定义指令的更多信息,并且我正在查看以下源代码:
https://github.com/dpiccone/ng-pageslide/blob/master/dist/angular-pageslide-directive.js
我注意到第 11 行 transclude: false,
但是,此指令包含在 div 周围。 嵌入是如何完成的?
给出的例子是这样的:
<div ... ng-controller="yourCtrl">
...
<pageslide ps-open="checked">
<div>
<p>some random content...</p>
</div>
</pageslide>
...
</div>
不使用template
as well. This means that <pageslide>
children elements are still available in link, and they can be manipulated。