本文介绍了如何根据我们在 angular 中单击的按钮更改 ngb Accordion 的 activeIds的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在另一个组件的模态中实现 ngbAccordion.当我点击 button1 时,我的带有手风琴的模态应该弹出,带有Acc1"tab open ,与按钮 2 类似.
I'm implementing the ngbAccordion in a modal in another component. When I click on a button1 ,my modal with the accordian should popup, with "Acc1" tab open , similarly with button 2.
谁能帮帮我.请找到我的代码.
Could anyone help me. please find my code.
推荐答案
答案已更新: 刚刚为 panelId 使用了 @Input 指令.请在这里找到它:https://stackblitz.com/edit/github-6r9hfp-k7upwx?file=src%2Fapp%2Fapp.component.ts
Answer updated: Just used @Input directive for panelId . Please find it here:https://stackblitz.com/edit/github-6r9hfp-k7upwx?file=src%2Fapp%2Fapp.component.ts
这篇关于如何根据我们在 angular 中单击的按钮更改 ngb Accordion 的 activeIds的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!