docs(checkbox): Fix checkbox docs, and add example and link about (#9222)

dependency injection
This commit is contained in:
tinayuangao
2018-01-31 10:23:39 -08:00
committed by GitHub
parent e7b697a37d
commit b781234806
+11 -2
View File
@@ -25,8 +25,17 @@ remove the indeterminate state.
### Click action config
When user clicks on the `mat-checkbox`, the default behavior is toggle `checked` value and set
`indeterminate` to `false`. Developers now are able to change the behavior by providing a new value
of `MatCheckboxClickAction` to the checkbox. The possible values are:
`indeterminate` to `false`. This behavior can be customized by
[providing a new value](https://angular.io/guide/dependency-injection)
of `MAT_CHECKBOX_CLICK_ACTION` to the checkbox.
```
providers: [
{provide: MAT_CHECKBOX_CLICK_ACTION, useValue: 'check'}
]
```
The possible values are:
#### `noop`
Do not change the `checked` value or `indeterminate` value. Developers have the power to