angularjsangular-materialmddialog

Add custom class to md-dialog-container


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
  });
}

Solution

  • Fixed it like this.

    <md-dialog class="myClass">
        <register-contact-activity-popup></register-contact-activity-popup>
    </md-dialog>`,>`,