How can i make a MatDialog draggable / Angular Material

前端 未结 4 934
情深已故
情深已故 2020-11-27 15:49

Is it possible to make a Angular Material Dialog draggable? I installed angular2-draggable and can of course use the functionality on all other elements.

But because

4条回答
  •  日久生厌
    2020-11-27 16:36

    in your module, import the cdk drag

    import { DragDropModule } from '@angular/cdk/drag-drop';
    

    and in html where dialog is for example, just add to any html element. i have added to first element and then i can drag the dialog anywhere i pick.

    
      content...
    
    

提交回复
热议问题