[Table] Error when using ng-content
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
`md-table` should wait until the `ng-content` replaced.
#### What is the current behavior?
`md-table` throws ` Cannot read property 'getColumnsDiff' of undefined`.
#### What are the steps to reproduce?
Put `ng-content` inside `md-table`.
https://plnkr.co/edit/RpOncq9lbwPcjAGjXSyR?p=preview
#### What is the use-case or motivation for changing an existing behavior?
Anyone that want to create a component with configurable `md-table` inside cannot do it.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: `4.4.0-RC.0` in the plunker, but this is not working with any version.
Material: `2.0.0-beta.10`
Beitragsleitfaden
Rechercherichtung
Beginne damit, den Fehler im verlinkten Plunker mit ng-content innerhalb von md-table zu reproduzieren, und verfolge dann, wann md-table im Verhältnis zum Ersetzen des projizierten Inhalts auf getColumnsDiff zugreift. Als erledigt gilt die Aufgabe, wenn md-table auf den projizierten Inhalt wartet und beim Einsatz innerhalb einer konfigurierbaren Komponente nicht mehr den Fehler wegen einer Eigenschaft von undefined auslöst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100