【发布时间】:2016-09-09 05:07:02
【问题描述】:
当我点击轮播左右按钮时,我总是被引导到另一个页面(登录页面)。我可以单击小按钮导航到其他幻灯片,但不能通过按钮。我不知道为什么会变成这样。
app.js
.state('home', {
url: '/home',
templateUrl: 'views/home.html',
controller: 'HomeController'
})
index.html
<li>
<a ui-sref="home" ui-sref-active="active">Home</a>
</li>
home.html
<section>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/img/ibm.png" alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="/img/ibm.png" alt="...">
<div class="carousel-caption">
...
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
【问题讨论】:
-
你在用
routing吗? -
也分享路线代码;
-
对不起,我没有为这个@itzmukeshy7 使用路由
标签: javascript html angularjs node.js