Carousels - nowzoo/nowzoo-angular-bootstrap-lite GitHub Wiki

  • NzbCarouselDirective code
  • selector: '[nzbCarousel]'
  • exportAs: 'nzbCarousel'
  • Examples

Use the nzbCarousel directive in native Bootstrap carousel markup. This creates an instance of NzbCarouselDirective, with an API that closely follows the native API, with some useful additions.

Options

The Angular directive itself does not have options. Use the native data- attributes to set options, such as interval. Use the .active class to set which .carousel-item is initially shown.

Methods

  • cycle(): void A wrapper around the native method. Starts the cycling of slides.
  • pause(): void A wrapper around the native method. Stops the cycling of slides.
  • slideTo(index: number): void A wrapper around the native $el.carousel(index) method. Shows the item at index.
  • prev(): void A wrapper around the native method. Goes to the previous slide.
  • next(): void A wrapper around the native method. Goes to the next slide.

Properties

  • events: Observable<Event> Provides the native Bootstrap carousel events (slide.bs.carousel, slid.bs.carousel) as an observable.
  • index: Observable<number> The index of the currently shown slide.
  • paused: Observable<boolean> Whether or not the carousel has been paused.
  • animating: Observable<boolean> Whether or not the carousel is transitioning from one slide to another.
  • data: Observable<any> The underlying Bootstrap data (i.e., $el.data('bs.carousel')).
⚠️ **GitHub.com Fallback** ⚠️