title: How to display Database data using Angular JS?
body: <p>How to handle mapping DB Tables to Angular Display which I think is one of the most common requirements in WebApps ? </p>
  
  <p>There are several factors that needs to be considered .</p>
  
  <p>1)For displaying the records , a 2D JSON would be fine ? </p>
  
  <p>Like for example :</p>
  
  <pre><code>var myList = function($scope){
      $scope.foods = [
          {name:"Pizza" , price:100},
          {name:"Pasta" , price:50},
          {name:"Burger" , price:30},
          {name:"Pepsi" , price:10},
          {name:"Icecream" , price:15}
         ]
      };
  </code></pre>
  
  <p>And for the refresh the view part , Is it good idea to sent a JSON of Primary IDN's for refreshing the view form Server ?</p>
  
  <p>2) Where should pagination be handled . I think a complete server side pagination is won't take advantage of  Angular's front end capabilities like Filter ? </p>
  
  <p>Short data say &lt; 1000 records would probably be better sent to server , While large data like 'search' can be paginated server side would be a good trade off ?</p>
  
  <p>For example :</p>
  
  <pre><code>Table : Student
  
  
  IDN Name  Univeristy Age 
  1   Mark  USC        21
  2   ...
  3   ...
  4   John  UFL        21
  </code></pre>