How to nest two directives on the same element in AngularJS?

后端 未结 7 979
误落风尘
误落风尘 2020-12-13 09:30

When I try to nest two directives on the same element I get the following error. Nested \"E\" directives - Multiple directives [...] asking for new/isolated scope

7条回答
  •  半阙折子戏
    2020-12-13 10:19

    The accepted response here solved the problem for me.

    Essentially remove the isolated scope from the directive and instead pass the scope property via the directive's link function (in the attributes parameter).

提交回复
热议问题