ngx-bootstrap手风琴在angular2中不能顺利运行

时间:2017-06-05 09:00:24

标签: angular accordion angular2-directives bootstrap-4

我使用过ngx-bootstrap手风琴,但它不能顺利运行。我尝试点击手风琴组,以便顺利切换。请告诉我们该怎么办?我关注此参考: - Angular Bootstrap Accordion

Component.html: -

<accordion>
 <accordion-group #first >
  <div accordion-heading>
   First
   <i class="pull-right float-xs-right glyphicon"
   [ngClass]="{'glyphicon-minus': first?.isOpen, 'glyphicon-plus': !first?.isOpen}">
   </i>
  </div>
  <div>
    Content 1
  </div>
 </accordion-group>

 <accordion-group #second>
   <div accordion-heading >
     Second
    <i class="pull-right float-xs-right glyphicon"
     [ngClass]="{'glyphicon-minus': second?.isOpen, 'glyphicon-plus': !second?.isOpen}"></i>
    </div>
    <div>
      Content 2
    </div>
 </accordion-group>

 <accordion-group #third>
   <div accordion-heading>
    Third
    <i class="pull-right float-xs-right glyphicon"
     [ngClass]="{'glyphicon-minus': third?.isOpen, 'glyphicon-plus': !third?.isOpen}"></i>
   </div>
   <div>
     Content 3
   </div>
 </accordion-group>
</accordion>

如果点击第一支手风琴那么打开手风琴但不顺利。请用动画来打开和关闭手风琴,如切换慢。

0 个答案:

没有答案