I do not think that you can call the reload () method directly, since it is part of the controller, which is visible only in directives.
You can either ...
A) starts a reboot directly from the masonry through the element, jQuery style
(see http://jsfiddle.net/riemersebastian/rUS9n/10/ ):
$scope.doReloadRelatively = function(e) { var $parent = $(e.currentTarget).parent().parent(); $parent.masonry(); } $scope.doReloadViaID = function() { $('#container').masonry(); }
B) or expand the directives themselves, i.e. add the necessary hours on the brickwork and call the reload () method inside (depending on which use case you have).
.directive('masonryBrick', function masonryBrickDirective() { return { restrict: 'AC', require: '^masonry', scope: true, link: { pre: function preLink(scope, element, attrs, ctrl) { var id = scope.$id, index; ctrl.appendBrick(element, id); element.on('$destroy', function () { console.log("masonryBrick > destroy") ctrl.removeBrick(id, element); }); scope.$watch(function () { return element.height(); }, function (newValue, oldValue) { if (newValue != oldValue) { console.log("ctrl.scheduleMasonryOnce('layout');"); ctrl.scheduleMasonryOnce('layout'); } } ); ...
In the above block of code, I simply added a clock to an element with a class class brick to cause a reboot of the masonry when the height of the elements changed.
I created jsFiddle to test passys' angular -masonry myself, feel free to check it out!
http://jsfiddle.net/riemersebastian/rUS9n/10/
EDIT:
Just found a similar entry in stackoverflow, which might be another solution to this problem:
AngularJS Freemasonry for dynamically changing heights