Two-way binding documentation is missing important information
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- angular, typescript
- Ambito
- documentation
Direzione di ricerca
Inizia da guide/templates/two-way-binding e consulta la guida collegata sugli input di model e la documentazione dell’API model per gli esempi attuali. Aggiorna la guida sul binding bidirezionale con un breve esempio che mostri sia banana-in-a-box sia la coppia input/output, e spiega che le modifiche del genitore non attivano immediatamente l’evento di modifica del figlio. Il lavoro è completato quando il comportamento chiave è chiaro in un unico punto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the problem that you experienced
When it comes to two-way binding (using the model signal), arguably the most important piece of information is that a value = model<string>(); declared in a child component can be used in the parent's template as either:
- Banana-in-a-box:
[(value)]="someValue" - A pair of input and output:
[value]="someValue" (valueChange)="onSomeValueChanged($event)"
And in the second case, we can additionally assume that whenever someValue changes in the parent component, and gets passed to child, onSomeValueChanged() will not immediately be called back on the parent component - which is critical for the "Data Down, Actions Up (DDAU)" / "unidirectional data flow" principle.
Unfortunately, learning this from the Angular documentation at https://angular.dev/ is not easy. The following links contain just small pieces of this puzzle:
- https://angular.dev/guide/templates/two-way-binding
- https://angular.dev/guide/components/inputs#model-inputs
- https://angular.dev/api/core/model
And even putting them all together doesn't fully convey the message described above.
Can we please update the documentation to describe the message from the top of this ticket, in a single place, in a brief way, with a good, illustrative example? (preferably instead of some of the existing content, which is rather unhelpful)
Enter the URL of the topic with the problem
https://angular.dev/guide/templates/two-way-binding
Describe what you were looking for in the documentation
I was trying to teach a colleague how to use a two-way binding, and was looking for good documentation.
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
If the problem is browser-specific, please specify the device, OS, browser, and version
Provide any additional information here in as much as detail as you can
- Lingua principale
- TypeScript
- Stelle
- 102k
- Fork
- 28.2k
- Merge medio
- 2g 10m
- PR unite (30g)
- 402
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di angular/angular
-
resource.reload() while params is in error switches the resource to 'idle' instead of retryingApertaarea: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
angular/angular#71585 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Assigning to a template reference in an event binding isn't reported by the compilerForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaarea: compiler
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
angular/angular#71511 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Signal Forms: `validateStandardSchema` throws a TypeError for an issue whose path runs through a key the model lacksForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea: forms gemini-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
`Symbol.iterator in FieldTree` is always falseForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaarea: forms forms: signals
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
angular/angular#70252 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area: docs gemini-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
angular/angular#68808 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di angular/angular
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
gofish-graphics/gofish-graphics#1384 ·
I maintainer di solito rispondono entro 1 giorno
-
adapter bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Olanetsoft/agent-lookout#353 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
vicharanashala/vibe#1542 ·
I maintainer di solito rispondono entro 1 giorno
-
bug chore P2 size:XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
josephfung/curia#2666 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
devarshishimpi/codra#178 ·
I maintainer di solito rispondono entro 1 giorno