I'm new to angularjs and I am trying to figure out how I can execute a
javascript function after a ng repeat is finished. How would I achieve this
?
My current controller method is as follows and the ng-repeat is working
fine :
angular.module('photoAppTest').controller('GalleryController', function
($scope, $http) {
var GalleryType = window.location.hash.substr(1);
$scope.paths = [];
$scope.fetchImageSrcs = function (folderSrc) {
var data = $.param({
FolderName: folderSrc + GalleryType
});
$http.post("api/GalleryFolders", data, { headers: { 'Content-Type':
'application/x-www-form-urlencoded' } }).success(function (data) {
$scope.results = data;
$scope.$apply();
});
};
}
);
Angular view :
<div ng-controller="GalleryController" ng-init="fetchImageSrcs('Gallery')">
<h1>GALLERY</h1>
<div id="Loader" align="center" style="visibility:visible">
<p>l o a d i n g . . .</p>
<img src="/SlideImages/loading.gif" />
</div>
<h2 ng-repeat="result in results" on-finish-render="">
{{result}}
</h2>
</div>
Any help will be awesome :)
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.