Skip to content

docs(dialog): document how to set default options using MAT_DEFAULT_DIALOG_OPTIONS #9319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 12, 2018
Merged
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/lib/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/lib/form-field/form-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down