mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
parent
dc911c635a
commit
8f6560857c
1 changed files with 4 additions and 6 deletions
|
|
@ -130,9 +130,7 @@ through the template.
|
|||
|
||||
## When to use model inputs
|
||||
|
||||
Use model inputs in components that exist to modify a value based on user interaction.
|
||||
Custom form controls, such as a date picker or combobox, should use model inputs for their
|
||||
primary value.
|
||||
|
||||
Avoid using model inputs as a convenience to avoid introducing an additional class property for
|
||||
containing local state.
|
||||
Use model inputs when you want a component to support two-way binding. This is typically
|
||||
appropriate when a component exists to modify a value based on user interaction. Most commonly,
|
||||
custom form controls such as a date picker or combobox should use model inputs for their primary
|
||||
value.
|
||||
|
|
|
|||
Loading…
Reference in a new issue