双击手风琴,打开角度为4的模态

时间:2018-01-16 11:34:10

标签: angular typescript angular-cli angular5

我使用手风琴并双击手风琴我想打开模态。因为单击它会扩展内容,我想使用双击并打开模态。是否有可能 DOUBLE CLICK ON ACCORDION

<ngb-accordion>
    <ngb-panel id="toggle-2" title="Second">
            <ng-template ngbPanelContent>
                  Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia
                  aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor,
                  sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica,
                  craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings
                  occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus
                  labore sustainable VHS.
                </ng-template>
              </ngb-panel>
 </ngb-accordion>

如果我双击标题,则应打开模态。

1 个答案:

答案 0 :(得分:0)

是的,在纯javascript中有dblclick()事件。

以角度显示,您可以像(dblclick)="myFunction()"

一样使用

了解更多活动here