search

Home  >  Q&A  >  body text

Can Angular.js use existing jquery slideshow?

Angular.js for beginners

The slideshow I use is http://www.malsup.com/jquery/cycle2/

But because the slide item comes from $http, in theory the cycle should be activated after the item is rendered on the page. But I don't know how to handle the event after $scope has completed data binding.

jquery cycle in slideshow is relatively easy to use, so I want to use it. How to achieve this? Or is there another way?

習慣沉默習慣沉默2776 days ago636

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-15 16:51:06

    Generally, it is encapsulated into a directive, scope.$watch in the link, and then activated in $timeout(fn,0) (note that the second parameter is 0)

    reply
    0
  • Cancelreply