Masonry with AngularJS

后端 未结 6 1514
情书的邮戳
情书的邮戳 2021-01-29 22:28

I am developing an \"art gallery\" app.

Feel free to pull down the source on github and play around with it.

Plunker with full

6条回答
  •  走了就别回头了
    2021-01-29 23:04

    Hey I just made masonry directive for AngularJS that is far more simpler than most of the implementations I've seen. Check the gist out here: https://gist.github.com/CMCDragonkai/6191419

    It's compatible with AMD. Requires jQuery, imagesLoaded and lodash. Works with dynamic amount of items, AJAX loaded items (even with initial items), window resizing, and custom options. Prepended items, appended items, reloaded items... etc. 73 lines!

    Here's a plunkr showing it work: http://plnkr.co/edit/ZuSrSh?p=preview (without AMD, but the same code).

提交回复
热议问题