components icon indicating copy to clipboard operation
components copied to clipboard

Example usage of MdDialog doesn't use md-dialog-content

Open alexsapps opened this issue 9 years ago • 4 comments

This page gives an example of how to use MdDialog but it does not surround the dialog contents with ... https://github.com/angular/material2/tree/master/src/lib/dialog

(I assume it is always required. The description of md-dialog-content is: "Scrollable content of the dialog." does not say that it's only required if scrolling is desired.)

alexsapps avatar Jan 12 '17 22:01 alexsapps

It's not required, and you can implement scrolling without it by using CSS

antonyRoberts avatar Jan 13 '17 00:01 antonyRoberts

@crisbeto can you add an example for this once the examples are moved to the material2 repo in #2781?

jelbourn avatar Jan 27 '17 01:01 jelbourn

For reference:

        <p md-dialog-title>{{ title }}</p>
        <md-dialog-content>
          <p>{{ message }}</p>
        </md-dialog-content>
        <md-dialog-actions>
          <button md-raised-button md-dialog-close>{{closeText}}</button>
          <button type="button" md-raised-button *ngIf="enableNext"
              (click)="dialogRef.close(true)">{{nextText}}</button>
        </md-dialog-actions>

This snippet demonstrates several things:

  1. variables can be utilized to insert text of anything.
  2. How md-dialog-title is used (this is documented in the example)
  3. How md-dialog-content is used.
  4. How is used.

machtyn avatar Jan 28 '17 05:01 machtyn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.