ng-bootstrap:Carousel不会自动滑动

时间:2017-01-30 04:11:11

标签: angular carousel ng-bootstrap

我在Angular 2中尝试ng-bootstrap但是我停留在旋转木马组件上,该组件未正常显示而不是自动滑动。 我使用的是angular-cli(第4节)。

package.json 有:

"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.19"

app.module.ts 有:

import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
...
imports: [...NgbModule.forRoot()...]

app.component.html 包含enter link description here

的确切副本
    <ngb-carousel>
  <template ngbSlide>
    <img src="http://lorempixel.com/900/500?r=1" alt="Random first slide">
    <div class="carousel-caption">
      <h3>First slide label</h3>
      <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
    </div>
  </template>
  <template ngbSlide>
    <img src="http://lorempixel.com/900/500?r=2" alt="Random second slide">
    <div class="carousel-caption">
      <h3>Second slide label</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
  </template>
  <template ngbSlide>
    <img src="http://lorempixel.com/900/500?r=3" alt="Random third slide">
    <div class="carousel-caption">
      <h3>Third slide label</h3>
      <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
    </div>
  </template>
</ngb-carousel>

结果: enter image description here

我在这里错过了什么?请帮忙。

0 个答案:

没有答案
相关问题