html - 手风琴标题中的href不起作用

use*_*er7 1 html anchor accordion angularjs angular-ui-bootstrap

我的手风琴有标题中的链接.它是这样一种方式,当点击标题上的任何地方时,可以打开手风琴.因此,当点击链接时,不会转到该链接(href),而是打开手风琴.

期望的行为:

我想要在标题中的任何地方点击除了链接之外打开该比例.(即,当点击链接时,必须重定向用户并且不得打开手风琴)

<div>
    <accordion close-others="false">
        <accordion-group is-open="isopen" ng-repeat="ele in arr">
            <accordion-heading>
                <div>
                    <i class="pull-right glyphicon"
                       ng-class="{'glyphicon-chevron-down': isopen, 'glyphicon-chevron-right': !isopen}"></i>
                    <div style="width: 50%; float: left; padding-left: 6cm;">{{ele.a}}
                        <span >
                            <a href="https://www.fb.com">link</a>
                        </span>
                    </div>
                    <div style="text-align: center;">
                        <span>{{ele.b}}</span>
                    </div>
                </div>
            </accordion-heading>
       </accordion-group>
     </accordion>
  </div>
Run Code Online (Sandbox Code Playgroud)

Plnkr

Pri*_*ceG 5

您需要$event.stopPropagation();在ng-click中调用- >ng-click="$event.stopPropagation(); fn1();"