Just started using Angular JS and I have some data available:
var aUsers=[{'name':'sachin','runs':20000},{'name':'dravid','runs':15000},{'name':'ganguly','runs':18000}]
I want to display this data in a table using ng-repeat.
<table><tr><th>Name</th><th>Runs</th></tr> <tr ng-repeat="obj in aUsers"> <td>{{obj.name}}</td> <td>{{obj.runs}}</td></tr></table>
The expected output is:
Name Runs
Sachin 20000
Dravid 15000
Ganguly 18000
However, when the resolution is mobile, I would like the view to change to:
Name sachin
Runs 20000
Name Dravid
Runs 15000
Name Ganguly
Runs 18000
I am utilizing Bootstrap for this purpose. Any help in making this work would be highly appreciated!
Thanks, Srinivasa Rao.CH