Hallo,
ich habe folgendes Problem, ich muss eine Tabelle erstellen mit unbekannter Spaltenanzahl.
Kein Problem eigentlich, wenn der Kopf nicht 2 Zeilig wäre.
|irgendwas Anderes in der Zeile| A | B |
|irgendwas Anderes in der Zeile| a | b | c | d | a | b | c | d |
A, B, .... sind dabei dynamisch,
a, b, c, d je erster Zelle sind immer fest.
A, und B habe ich hin bekommen, indem ich
<th colspan="4" ng-repeat="portfolio in portfolios">
{{portfolio}}
</th>
verwendet habe
Nun die Frage, wie wiederhole ich die Zellenfolge
<th>a</th>
<th>b</th>
<th>c</th>
<th>d</th>
so oft wie Elemente in portfolios sind?
Vielen Dank im Voraus
Dirk
Schau dir mal ng-repeat-start in der Doku an: https://docs.angularjs.org/api/ng/directive/ngRepeat
Und poste dann deine Lösung hier, bitte 😉
ImageTools for Silverlight: http://imagetools.codeplex.com | http://www.silverdiagram.net | http://www.cleancodedeveloper.de b:::
hallo,
nach langem Suchen (man findet 1000-Scheiß) habe ich jetzt auch selbst eine Lösung gefunden:
<tr>
<th>irgendwas </th>
<th>Anderes </th>
<th>in</th>
<th>der</th>
<th>Zeile</th>
<td ng-repeat-start="portfolio in portfolios">a</td>
<th>b</th>
<th>c</th>
<td ng-repeat-end>d</td>
</tr>
funktioniert prima.
Anhand des Stichwortes ng-repeat-start gehe ich davon aus, dass es die gleiche Lösung ist.
Danke