Multiple directives [myPopup, myDraggable] asking for new/isolated scope

后端 未结 7 707
情书的邮戳
情书的邮戳 2020-12-02 18:21

I wrote a directive for dialogs (myPopup) and another one for dragging this dialog (myDraggable), but I allways get the error:

Multiple directives [m

7条回答
  •  遥遥无期
    2020-12-02 18:49

    Leave out scope: { enabled: '=myDraggable' } from your "myDraggable"-directive you don't need it. So:

      return {
        restrict: 'A',
        replace: false,
        link: function (scope, elm, attrs) {
    

提交回复
热议问题