docs-bug(chips): the "form example" is not fully related to forms
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Documentation Feedback
We have `chips-form-control-example`, `chips-reactive-form-example` components that intend to illustrate how chips interact with the form control.
I see 2 problems here.
1. The interaction with `mat-chip-grid` is happening not fully through the formControl. For now the source of chips's list is `keywords` signal, not the formControl: `@for (keyword of keywords(); track keyword) {`
It seems we should take the formControl as the source of chips's list (not the signal): `@for (keyword of formControl.value || []; track keyword) {`
Moreover we could get rid of the signal, because the goal of the example is to show the interaction between the formControl and the chips in the template.
2. These two examples of `chips-form-control-example` and `chips-reactive-form-example` components duplicate each other. They have the same logic inside of components classes. So it seems we could leave only one of these two examples.
### Affected documentation page
https://material.angular.dev/components/chips/examples
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit den in der Issue referenzierten Komponenten chips-form-control-example und chips-reactive-form-example und prüfen Sie die auf der chips-Dokumentationsseite gezeigten Beispiele. Vergleichen Sie ihre Klassen und Templates; als erledigt gilt die Aufgabe, wenn die Chips-Liste über das formControl statt über das keywords signal demonstriert wird und das doppelte Beispiel entfernt oder zusammengeführt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- documentation, frontend
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100