How To Call Function after ng-repeat get Load ?



<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js"></script>
 <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script>
<script>
               var App = angular.module('myApp', ['ui.bootstrap']);
                App.directive("repeatEnd", function(){
                    return {
                        restrict: "A",
                        link: function (scope, element, attrs) {
                            if (scope.$last) {
                                scope.$eval(attrs.repeatEnd);
                            }
                        }
                    };
                });

           App.controller('myctrl',['$scope',function($scope)
            {

                     $scope.names = '["test","Tst2"]';
                      var onEnd = function(){
                             console.log('load is complete');
                      };

            }]);
</script>

<body ng-app="myApp" class="container" ng-controller="myctrl" id="LineSite">
        <div ng-repeat="name in names" repeat-end="onEnd()"/>
</body>


Creating new document from image base64 text

Creating new document from image base64 text


        blob fileContent = EncodingUtil.base64Decode(fileData); //fileData is base64 data of image. 
  Attachment a = new Attachment(parentId = parentId); // parentId : Id of record.
  a.body = fileContent;
  a.name = 'ImageName.png';
  insert a;