jelgblad / angular2-masonry

https://github.com/desandro/masonry module for Angular2
101 stars 48 forks source link

using reloadItems() in Angular 2 #27

Closed ht89 closed 7 years ago

ht89 commented 7 years ago

Dear @jelgblad, could you please show me how to use reloadItems() in Angular 2? There's no documentation about that. Thank you a lot.

szbartnik commented 7 years ago

@jelgblad I'm also interested how to reload items after DOM changes. Do you have any temporary workaround to masonry's unexposed methods problem? Here is related question (without response) - #26

jelgblad commented 7 years ago

@ht89, @kneefer in v0.3.1 _msnry gives you access to the Masonry-instance. Note that i haven't tested all of the Masonry API, and that's why there's a lot missing from the AngularMasonry API. https://github.com/jelgblad/angular2-masonry/issues/26#issuecomment-265695247

So now you can do masonry._msnry.reloadItems(). See https://github.com/jelgblad/angular2-masonry/issues/10#issuecomment-243238801 on how to access AngularMasonry in your component.

ht89 commented 7 years ago

@jelgblad thanks for your reply.