I want to use ng-repeat to display a data table that provides a JSON format like this
{"name":"Aruba","code":"ABW","1960":54208,"1961":55435}, {"name":"Afghanistan","code":"AFG","1960":8774440,"1961":8953544}
But my code below does not seem to work with {{country.1961}}.
<table> <tr> <td>Country name</td> <td>1960 population</td> <td>1970 population</td> <td>1980 population</td> <td>1990 population</td> <td>2000 population</td> <td>2010 population</td> <td>Percentage growth between 1960 and 2010</td> </tr> <tr ng-repeat="country in countries"> <td>{{ country.name }}</td> <td>{{ country.1961 }}</td> </tr> </table>
When I delete <td>{{ country.1961 }}</td> everything works fine. How can i fix this?
Thanks!
source share