javascript - AngularJS - ng-repeat to display empty cell/s when data is not available when using slice twice -
i have simple ng-repeat loops through json file list of countries , details country e.g. currency, population particular set of months (24 in case) my ng-repeat loops through first 12 months successfully, , displaying corresponding text when ng-switch criteria met. additionally, first 12 months, if there no data available, 'empty' displayed in cell. however, using 2 ng-repeats , slice , cant seem getemptycells function work/display empty months greater 12. html: <div ng-app=""> <div ng-controller="eventcontroller"> <table> <tr ng-repeat="country in countries"> <th>{{country.countryname}}</th> <td ng-repeat="countrydetails in country.details.slice(0, 12)" ng-switch="countrydetails"> <span ng-switch-when="11">medium</span> <span ng-switch-when="22">large</span> <span ng-s...