AngularJS directive transclude scope=false?

前端 未结 2 1007
伪装坚强ぢ
伪装坚强ぢ 2021-01-05 08:02

How to prevent directive with transclude to create new scopes?

This jsfiddle I cant bind anything due to the new scopes illustrated with red borders.

2条回答
  •  我在风中等你
    2021-01-05 09:01

    Although this is not recommended by the Angular team, another workaround is to explicitly call the $parent scope within the transcluded portion:

    123

提交回复
热议问题