3

I have a button that opens a md-dialog-container. Is it possible to add a custom class to the root of that md-dialog-container?

<button class="button bluebutton right" ng-click="vm.launchContactActivityPopup()" ng-if="vm.isPersisted()" ng-disabled="!vm.isAllowedToRegisterContactActivity()">Contactd vastleggen</button>
public launchContactActivityPopup(): void {
  this.$mdDialog.show({
    template: `<register-contact-activity-popup></register-contact-activity-popup>`,
    targetEvent: null,
    clickOutsideToClose: false
  });
}
Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185

2 Answers2

3

Fixed it like this.

<md-dialog class="myClass">
    <register-contact-activity-popup></register-contact-activity-popup>
</md-dialog>`,>`,
Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185
1

Use panelClass:

public launchContactActivityPopup(): void {
    this.$mdDialog.show({
        template: `<register-contact-activity-popup></register-contact-activity-popup>`,
        targetEvent: null,
        clickOutsideToClose: false,
        panelClass: 'myClass'
    });
}
Jeffrey Roosendaal
  • 6,872
  • 8
  • 37
  • 55