ngRepeatWithUpdateFn

by Aakash Khapare M

HTML

<div ng-app="myApp" ng-controller="myCtrl">
    <h4 ng-repeat="h in headings">{{updateValue(h.value)}}</h4>
</div>

JavaScript

angular.module("myApp", [])
.controller("myCtrl", ['$scope', function($scope){
    $scope.headings = [{
        value: "Heading1"
    },{
        value: "Heading2"
    },{
        value: "Heading3"
    }]
    $scope.updateValue = function(h){
        return "Updated " + h;
    }
}]);