How To
Documentation
    Learn More

      widget:carousel

      Description

      Creates a horizontal carousel

      Usage

      as element:
      <widget:carousel
             [carousel-name="{string}"]
             [carousel-watch="{Object}"]
             [loop="{boolean}"]
             [auto-play="{number}"]
             [random-start="{boolean}"]
             [controls="{boolean}"]
             [height="{number}"]
             [pagination="{boolean}"]>
      </widget:carousel>
      as attribute
      <ANY widget-carousel
           [carousel-name="{string}"]
           [carousel-watch="{Object}"]
           [loop="{boolean}"]
           [auto-play="{number}"]
           [random-start="{boolean}"]
           [controls="{boolean}"]
           [height="{number}"]
           [pagination="{boolean}"]>
         ...
      </ANY>

      Parameters

      ParamTypeDetails
      carousel-name
      (optional)
      string

      The name of the carousel so it can be retrieved from the Carousel service. This can be used to control the carousel from another element.

      carousel-watch
      (optional)
      Object

      A variable to watch for changes to the slides data. When creating the slides in an ngRepeat the object should be set here to watch for changes.

      loop
      (optional)
      boolean

      Whether the carousel should loop. Default true.

      auto-play
      (optional)
      number

      Milliseconds to wait until animating to the next slide. By default the carousel will not auto slide

      random-start
      (optional)
      boolean

      Randomises starting slide

      controls
      (optional)
      boolean

      Adds left and right arrows for navigation. Default true.

      height
      (optional)
      number

      Set the height of the carousel. By default the height is dynamically set to the height of the active slide.

      pagination
      (optional)
      boolean

      Whether to show pagination dots. Default false.

      Example

      Source

      
      
      
      
      
      

      Demo