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

后端 未结 7 702
情书的邮戳
情书的邮戳 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 19:06

    my error was similar:

    Error: [$compile:multidir] Multiple directives [groups, groups] asking for new/isolated scope on:

    In my case I had duplicate declaration of

     .component('groups', new GroupsComponent()); 
    

    in app.js/app.ts file

    and at the same time on the component itself

    const groups = angular.module('groups', ['toaster'])
    .component('groups', new GroupsComponent());
    

    Removing it from app.js/app.ts fixed the issue.

    0 讨论(0)
提交回复
热议问题