1

Is it possible to add directives to a popup service, in our case we use Kendo and would like to add the cdkDrag directive to the popup, we have not been able to get the popup to be draggable. Only the contents in the popup are draggable.

import { DialogCloseResult, DialogRef, DialogService } from '@progress/kendo-angular-dialog';

constructor(
    private dialogService: DialogService,
){}

constructPopup(){
    const dialogRef = this.dialogService.open({
        title: "Some Title",
        content: MyCustomComponent
    });
}
  • 1
    Directives were made to be added to the template. There's no straightforward way of doing the same programmatically, but you can inspect the source code and check how to instantiate the classes involved and eventually register the instances with some service to do the same programmatically. – julianobrasil Apr 19 '22 at 11:21

1 Answers1

0

Kendo has a window service that you can use instead that is draggable

import { WindowService } from "@progress/kendo-angular-dialog";

constructor(
    private _window: WindowService,
){}

constructPopup(){
    const dialogRef = this.dialogService.open({
        title: "Some Title",
        content: MyCustomComponent
    });
}

This option is draggable and gives all the same functionality as the dialogue and some more.

Hope this answer helps