AngularJS Live Example
by fess81
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<div ng-controller = "fessCntrl">
<pre>{{employeeRewardDataNew.length|json}}</pre>
</div>
JavaScript
var fessmodule = angular.module('myModule', []);
fessmodule.controller('fessCntrl', function ($scope) {
$scope.employeeRewardData = [
{
"cin_number": 0,
"function_id": 3118,
"grade_id": 163,
"role_id": 15858,
"location_id": 151,
"employee_designation": "NA",
"bu_id": 90,
"gen_id": "GPR01",
"reward_id": 0,
"employee_id": 644,
"reward_category_id": 2,
"sepserial_no": 0,
"sepemployee_id": 0,
"fname": "Smiles",
"emp_type": 381,
"status": "Active",
"location_name": "Corporate",
"level_id": 207,
"lname": "Administrator",
"reward_cust_id": 0,
"reward_to_userid": 644,
"corresponding_status_id": 0,
"company_id": 7,
"reward_by_userid": 644
},
{
"cin_number": 0,
"function_id": 3118,
"grade_id": 163,
"role_id": 15858,
"location_id": 151,
"employee_designation": "NA",
"bu_id": 90,
"gen_id": "GPR01",
"reward_id": 0,
"employee_id": 644,
"reward_category_id": 3,
"sepserial_no": 0,
"sepemployee_id": 0,
"fname": "Smiles",
"emp_type": 381,
"status": "Active",
"location_name": "Corporate",
"level_id": 207,
"lname": "Administrator",
"reward_cust_id": 0,
"reward_to_userid": 644,
"corresponding_status_id": 0,
"company_id": 7,
"reward_by_userid": 644
},
{
"cin_number": 0,
"function_id": 175,
"grade_id": 147,
"role_id": 20469,
"location_id": 152,
"employee_designation": "Chief Officer Client Studio",
"bu_id": 90,
"gen_id": "GPR00082",
"reward_id": 0,
"employee_id": 741,
"reward_category_id": 1,
"sepserial_no": 0,
"sepemployee_id": 0,
"fname": "Sheena",
"emp_type": 381,
"status": "Active",
"location_name": "Bangalore",
"level_id": 178,
"lname": "Sharma",
"reward_cust_id": 0,
"reward_to_userid": 741,
"corresponding_status_id": 0,
"company_id": 7,
"reward_by_userid": 644
},
{
...