Accordeon *ngfor

Hello! 
How can I make dynamic accrodion item add? 
I refresh data after click , but nothing happend(( 
<ejs-accordion #accordion>
<e-accordionitems>
<e-accordionitem *ngFor="let report of data">
.............................
      <button ejs-button cssClass="e-info" (click)="showMoreItem()">Show More</button>

1 Reply

AP Arun Palaniyandi Syncfusion Team June 8, 2018 11:50 AM UTC

Hi  Ali Kholmatov,  
  
Thanks for contacting Syncfusion support.  
 
Based on your requirement on adding dynamic accordion item, we suggest you to pass it as an item model using the addItem public method. Please find the below code snippet for more reference. 
 
 
  public showMoreItem(e) { 
 
    let items = { header: 'NewHeader', content: 'NewContentAdded' }; // give the item as item model with header and content property  
    this.acrdnInstance.addItem(items); // add the item using addItem 
 
  } 
 
 
 
We have also prepared a sample for your reference below.   
 
 
Please check the above shared details and  let us know if you need any further assistance. 
 
Regards,  
Arun P.  


Loader.
Up arrow icon