From b98febae284fcfbff0b5f1f06a26e745aa9dcfa5 Mon Sep 17 00:00:00 2001 From: Lazaro Fernandes Lima Date: Mon, 22 Sep 2014 15:49:49 -0300 Subject: [PATCH 1/3] add reference to imagesloaded plugin at readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4454f9c..43a0546 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,16 @@ This directive is meant for the raw masonry lib and not the jQuery one. > First you include it on your app ```html + ``` +or + +``` +bower install angular-masonry-directive +``` + > Than setup your app ```javascript From c92dabbad672a417513b57835fa2f9decc6f14eb Mon Sep 17 00:00:00 2001 From: Lazaro Fernandes Lima Date: Tue, 23 Sep 2014 17:45:09 -0300 Subject: [PATCH 2/3] When the scope is updated or removed performs update --- src/angular-masonry-directive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/angular-masonry-directive.js b/src/angular-masonry-directive.js index 74d5e56..c2b6328 100644 --- a/src/angular-masonry-directive.js +++ b/src/angular-masonry-directive.js @@ -39,6 +39,10 @@ imagesLoaded( elem.get(0), update); elem.ready(update); + + scope.$watch(function () { + update(); + }); } }; }); From 10fb1c6c9afb2635ac428f1158ba3efdf8b4bf36 Mon Sep 17 00:00:00 2001 From: Lazaro Fernandes Lima Date: Tue, 23 Sep 2014 17:46:30 -0300 Subject: [PATCH 3/3] scope.items is not being used --- src/angular-masonry-directive.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/angular-masonry-directive.js b/src/angular-masonry-directive.js index c2b6328..04f1779 100644 --- a/src/angular-masonry-directive.js +++ b/src/angular-masonry-directive.js @@ -5,7 +5,6 @@ return { restrict: 'AC', link: function(scope, elem, attrs) { - scope.items = []; var container = elem[0]; var options = angular.extend({ itemSelector: '.item'