AngularJS ngRepeat and orderBy.

by Sajeetharan Sinnathurai

HTML

<div ng-app="myApp" ng-controller="PatientListCtrl">
    <div ng-repeat="patient in patients ">
        <businesscard>{{patient.id}} {{patient.first_name}}</businesscard>
    </div>
</div>

JavaScript

angular.module('myApp', [])
    .controller('PatientListCtrl', function($scope) {
        $scope.patients =[
    {
        "id": 0, 
        "first_name": "John", 
        "last_name": "Abruzzi"
    }, 
     {
        "id": 1, 
        "first_name": "Peter", 
        "last_name": "Burk"
    }
];
    });