Home > Enterprise >  First panel open on init with custom accordion-angular
First panel open on init with custom accordion-angular

Time:11-07

I created a library with a custom accordion in angular with bind event for auto close when other panel is clicked in "Toggle", my problem is that I need the first panel open at start by default.

here is a stackblitz with the code:

How should start

thank you for your help in advance.

CodePudding user response:

Just add a initial value to activeTitle

 activeTitle: string = 'Documento 1';

Demo

  • Related