【问题标题】:Component doesn't load when using mdbootstrap carousel with angular universal使用带有角度通用的 mdbootstrap 轮播时组件不加载
【发布时间】:2018-06-20 15:14:26
【问题描述】:

我使用了带角度通用的 mdbootstrap 轮播。其余组件工作正常,但我在主屏幕上使用轮播时遇到问题。主页没有加载,但是当我访问不同的页面并再次调用主页时,页面会被加载。

我的主页组件 HTML 文件。

<section style="background-color: #00bfff">
  <div class="home">
    <mdb-carousel [isControls]="false" class="carousel slide carousel-fade" [animation]="'fade'">
      <mdb-slide>
        <div class="container-fluid">
          <div class="home-slider">
            <div></div>
            <div class="home-head">
              <p class="home-head-1">Get your personal career coach</p>
              <br>
              <button class="home-button">KNOW MORE</button>
            </div>
            <div>
              <img class="img-fluid home-img mx-auto d-block" src="/assets/images/slider/1.png" alt="boardinfinity" style="margin-bottom:25px;">
            </div>
          </div>
        </div>
      </mdb-slide>
      <mdb-slide>
        <div class="container-fluid">
          <div class="home-slider">
            <div></div>
            <div class="home-head">
              <p class="home-head-1">Get a career boost with great jobs.</p>
              <br>
              <button class="home-button">KNOW MORE</button>
            </div>
            <div>
              <img class="img-fluid home-img mx-auto d-block" src="/assets/images/slider/2.png" alt="boardinfinity" style="position: relative;top: 3px;">
            </div>
          </div>
        </div>
      </mdb-slide>
    </mdb-carousel>
  </div>
</section>

任何帮助将不胜感激。

【问题讨论】:

  • 控制台(服务器/客户端)是否有任何错误?
  • @David 控制台没有错误
  • 如果主页没有加载,你会看到什么?
  • @David Infinite 加载等待本地主机,我在我的节点控制台上得到这个 GET / - - ms - -
  • 你看到那个线程了吗?不知道是不是同样的问题mdbootstrap.com/support/…

标签: angular server-side-rendering angular-universal mdbootstrap


【解决方案1】:

请尝试将[interval]="0" 添加到您的&lt;mdb-carousel&gt; 元素中。这应该适合你。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    • 1970-01-01
    • 2020-12-29
    • 2018-11-22
    相关资源
    最近更新 更多