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
This commit is contained in:
CDDelta
2018-01-13 04:39:58 +11:00
committed by Andrew Seguin
parent baa8a6e827
commit acd90669d3
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -39,6 +39,18 @@ export class YourDialog {
}
```
### Specifying global configuration defaults
Default dialog options can be specified by providing an instance of `MatDialogConfig` for
MAT_DIALOG_DEFAULT_OPTIONS in your application's root module.
```ts
@NgModule({
providers: [
{provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: false}}
]
})
```
### 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.
+1 -1
View File
@@ -38,7 +38,7 @@ present in the form field control. It can also be set to `auto` to restore the d
<!-- example(form-field-label) -->
Global default label options can be specified by setting providing a value for
Global default label options can be specified by providing a value for
`MAT_LABEL_GLOBAL_OPTIONS` in your application's root module. Like the property, the global
setting can be either `always`, `never`, or `auto`.