AngularJS ngRepeat and orderBy.

by Sajeetharan Sinnathurai

HTML

<body ng-app="app">
    <div ng-controller="myController">
        <p>I am from {{text}}</p>
    </div>
</body>

JavaScript

(function () {
    "use strict"; 
   
    function myController($scope, $http) {
        var vm = this;
        $scope.text = "Delhi";
    }
    myController.$inject = ["$scope", "$http"];    
    angular.module("app")
       .controller("myController", myController);
}());