multidimensional array - Skip iteration in nested AngularJS Repeat -


a bit of background first:

i creating web app display multiple reports onscreen simultaneously in table. way reports stored in own separate tables. of angular app loops through loaded reports , places them so:

group 1   report1 val1 val2 val3...   report2 val1 val2 val3...   reportn val1 val2 val3... group 2   report1 val1 val2 val3...   report2 val1 val2 val3...   reportn val1 val2 val3... group n   report1 val1 val2 val3...   report2 val1 val2 val3...   reportn val1 val2 val3... 

the problem getting of reports lack row given grouping, makes overall table mismatched in end. wondering if there means within ngrepeat more or less skip row while looping in order place values in respective group?

the solution can think of manually insert blank rows in other reports have matching dimensions, if angular can facilitate better, , far google has yielded no results.

for reference, current table generating code:

<tbody>     <tr ng-repeat-start="row in loadedreports[0].data" ng-if="loadedreports.length > 1 && !loadedreports[1].empty">         <td ng-repeat="count in row track $index" class="title" ng-show="$index > 12 - range || $first"><span ng-show="$first">{{ row[0] }}</span></td>     </tr>     <tr ng-repeat="report in $parent.loadedreports" ng-repeat-end>         <td ng-repeat="value in report.data[$parent.$index] track $index" ng-class="{'title': $first && $parent.$parent.$last && ($parent.$parent.loadedreports.length === 1 || $parent.$parent.loadedreports[1].empty)}" ng-show="$index > 12 - range || $first">             <span ng-if="$parent.$parent.loadedreports.length > 1 && !$parent.$parent.loadedreports[1].empty && $first">{{ report.name }}</span>             <span ng-if="($parent.$parent.loadedreports.length === 1 && $first) || ($parent.$parent.loadedreports[1].empty) || $index > 12 - range">{{ value | numberformat : report.datatype }}</span>         </td>     </tr> </tbody> 

edit clarification of code:

  • range control on screen allow 13 of stored values in row displayed, minimally 2.
  • data 2 dimensional array contains row each group in data set


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -