Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/cdk/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ bootstrapApplication(MyApp, {
});
```

> **Note:** The value provided for `DEFAULT_DIALOG_CONFIG` **replaces** the built-in defaults
> entirely rather than merging with them. For example, providing `{disableClose: true}` means that
> all other defaults (such as `hasBackdrop`) will be `undefined`. If you only want to override
> specific properties, spread the defaults first:
>
> ```ts
> {provide: DEFAULT_DIALOG_CONFIG, useValue: {...new DialogConfig(), disableClose: true}}
> ```
>
> When you call `dialog.open()` with a config, that config is merged on top of these defaults, so
> per-dialog options always take precedence.

### Sharing data with the Dialog component.
You can use the `data` option to pass information to the dialog component.

Expand Down
12 changes: 12 additions & 0 deletions src/material/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ bootstrapApplication(MyApp, {
});
```

> **Note:** The value provided for `MAT_DIALOG_DEFAULT_OPTIONS` **replaces** the built-in defaults
> entirely rather than merging with them. For example, providing `{disableClose: true}` means that
> all other defaults (such as `hasBackdrop`) will be `undefined`. If you only want to override
> specific properties, spread the defaults first:
>
> ```ts
> {provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {...new MatDialogConfig(), disableClose: true}}
> ```
>
> When you call `dialog.open()` with a config, that config is merged on top of these defaults, so
> per-dialog options always take precedence.

### Sharing data with the Dialog component.
If you want to share data with your dialog, you can use the `data`
option to pass information to the dialog component.
Expand Down
Loading