简体   繁体   English

具有引导程序和角度的选项卡视图

[英]tab views with bootstrap and angular

I made a tab view using bootstrap for a angular template. 我使用引导程序为角度模板制作了一个选项卡视图。 but when i click on the tab it goes to the angular link router instead of going to the tab content.it may be because i have them as links but at the moment i really don't have any idea of how im going to solve this 但是当我单击选项卡时,它转到角度链接路由器而不是选项卡content.it。这可能是因为我将它们作为链接,但是目前我真的不知道如何解决这个问题

    <ul class="nav nav-tabs">
    <li class="active"><a href="#info-tab" data-toggle="tab">Where you heading <i class="fa"></i></a></li>
    <li><a href="#address-tab" data-toggle="tab">Description<i class="fa"></i></a></li>
</ul>
<form id="rideForm" method="post" class="form-horizontal">
    <div class="tab-content">
        <div class="tab-pane active" id="info-tab">
            <div class="form-group">
                <label class="col-sm-2 control-label">From:</label>
                <div class="col-sm-3">
                    <input type="text" class="form-control" name="fullName" />
                </div>
                <label class="col-sm-2 control-label">To:</label>
                <div class="col-sm-3">
                    <input type="text" class="form-control" name="Email" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">Time:</label>
                <div class="col-sm-3">
                    <input type="text" class="form-control" name="jobTitle" />
                </div>
            </div>
            <div id="ridebuttongroup" class="col-sm-5 col-sm-offset-3">
                <a href="#address-tab" data-toggle="tab"><button type="next" class="btn btn-default">
                    <span class="glyphicon glyphicon-circle-arrow-right"></span> Next  </button></a>
            </div>
        </div>

        <div class="tab-pane" id="address-tab">
            <div class="form-group">
                <label class="col-sm-3 control-label">Description</label>
                <div class="col-sm-5">
                    <textarea rows="4" cols="50"></textarea>
                </div>
            </div>


            <div id="ridebuttongroup" class="col-sm-5 col-sm-offset-3">
                <button type="submit" class="btn btn-default">
                    <span class="glyphicon glyphicon-plane"></span> Ride</button>
                <a href="#info-tab" data-toggle="tab"><button type="next" class="btn btn-default">
                    <span class="glyphicon glyphicon-circle-arrow-left"></span> Previous  </button></a>
            </div>
        </div>
    </div>

    <div style="margin: 15px">
    </div>
</form>

please help! 请帮忙!

停止将头撞在墙上,只需使用http://angular-ui.github.io/bootstrap/

A quick work around to this issue is to add: 解决此问题的快速方法是添加:

target="_blank"

to your links. 到您的链接。 Angular, behind the scenes, does stuff to your links which is why you're having that problem. Angular在后台隐藏了链接的内容,这就是您遇到问题的原因。

This is a temp. 这是临时的。 solution to the issue. 解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM