klederson / angular-masonry-directive

A very simple and 100% compatible masonry directive for AngularJS ... do you know how to use masonry? Good! You know how to use this
115 stars 68 forks source link

imagesLoaded is not executed #15

Open Ainaras opened 9 years ago

Ainaras commented 9 years ago

Hi,

Now I'm trying to use this directive, but imagesLoaded does not work, if my tiles are included direct from HTML:

<div masonry='{ "transitionDuration" : "0.4s" , "itemSelector" : ".tile"}'>
  <div class="tile" masonry-tile>custom HTML</div>
  <div class="tile" masonry-tile>custom HTML</div>
</div>

It seems to me, that link of masonryTile directive is started earlier than link of masonry directive. I think that I found explanation: http://stackoverflow.com/questions/18294726/calling-order-of-link-function-in-nested-and-repeated-angularjs-directives#answer-18491502

nesevis commented 9 years ago

I'm having the same problem.

ghost commented 9 years ago

I confirmed this and made a pull request #19 that fixes the issue.