Skip to content

Commit acd9066

Browse files
CDDeltaandrewseguin
CDDelta
authored andcommitted
docs(dialog): document how to set default options using MAT_DEFAULT_DIALOG_OPTIONS (#9319)
* docs(dialog): document how to set default options * docs(form-field): fix typo * Address comments
1 parent baa8a6e commit acd9066

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/lib/dialog/dialog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ export class YourDialog {
3939
}
4040
```
4141

42+
### Specifying global configuration defaults
43+
Default dialog options can be specified by providing an instance of `MatDialogConfig` for
44+
MAT_DIALOG_DEFAULT_OPTIONS in your application's root module.
45+
46+
```ts
47+
@NgModule({
48+
providers: [
49+
{provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}}
50+
]
51+
})
52+
```
53+
4254
### Sharing data with the Dialog component.
4355
If you want to share data with your dialog, you can use the `data` option to pass information to the dialog component.
4456

src/lib/form-field/form-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ present in the form field control. It can also be set to `auto` to restore the d
3838

3939
<!-- example(form-field-label) -->
4040

41-
Global default label options can be specified by setting providing a value for
41+
Global default label options can be specified by providing a value for
4242
`MAT_LABEL_GLOBAL_OPTIONS` in your application's root module. Like the property, the global
4343
setting can be either `always`, `never`, or `auto`.
4444

0 commit comments

Comments
 (0)