Angularjs with Packery.js

前端 未结 2 1367
时光取名叫无心
时光取名叫无心 2021-02-06 18:03

Trying to get Packery.js working with an angularjs app I\'m working with.

For some reason they don\'t seem to play nice together. I th

2条回答
  •  情书的邮戳
    2021-02-06 18:45

    Any JS library you find will not simply work with Angular. Angular does compilation of the DOM which causes other libraries to lose the context. You must write a custom directive.

    I found an existing directive for Masonry: https://github.com/passy/angular-masonry and packery is pretty similar to Masonry so I'm sure you can adapt it for packery.

提交回复
热议问题