We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tab and Accordin not working

Thread ID:

Created:

Updated:

Platform:

Replies:

146595 Aug 9,2019 02:21 PM UTC Aug 14,2019 03:36 AM UTC Angular - EJ 2 3
loading
Tags: Tab
LUCIANO ALMEIDA PIMENTA
Asked On August 9, 2019 02:21 PM UTC

Hello
I have a Tab control and would like to add an Accordion control. When I do this, none of the onscreen controls appear.

Sample Code:
<ejs-tab id = "tabDefault">
            <e-tabitems>
                <e-tabitem>
                    <ng-template #headerText>
                        <div> General Data </div>
                    </ng-template>
                    <ng-template #content>
                        <br />
                        HTML
                    </ng-template>
                </e-tabitem>
                <e-tabitem>
                    <ng-template #headerText>
                        <div> Address </div>
                    </ng-template>
                    <ng-template #content>
                        <br />
                        HTML
                    </ng-template>
                </e-tabitem>
                <e-tabitem * ngIf = "edition">
                        <ng-template #headerText>
                            <div> Photos </div>
                        </ng-template>
                        <ng-template #content>
                            <br />
                            
                            <ejs-accordion>
                                    <e-accordionitems>
                                      <e-accordionitem expanded = 'false'>
                                        <ng-template #header>
                                          <div> Add Photo </div>
                                        </ng-template>
                                        <ng-template #content>
                                            HTML
                                        </ng-template>
                                      </e-accordionitem>
                                    </e-accordionitems>
                            </ejs-accordion>
                            
                        </ng-template>
                </e-tabitem>
                <e-tabitem * ngIf = "edition">
                        <ng-template #headerText>
                            <div> Locks </div>
                        </ng-template>
                        <ng-template #content>
                            <br />
                            
                        </ng-template>
                </e-tabitem>
            </e-tabitems>
        </ejs-tab>

Without Accordion


With Accordion


Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 13, 2019 08:58 AM UTC

Hi LUCIANO, 
 
Syncfusion greetings. 
 
We could reproduce the reported issue while rendering the Accordion with template inside the Tab content template. Kindly use the below code example to overcome the issue. 
 
<e-tabitem [header]='headerText[0]' [content]="content1"></e-tabitem> 
 
<ng-template #content1 let-data> 
      <ejs-accordion> 
        <e-accordionitems> 
          <e-accordionitem expanded='true'> 
            <ng-template #header> 
              <div>ASP.NET</div> 
            </ng-template> 
            <ng-template #content> 
              <div>Microsoft ASP.NET is a set of technologies in the Microsoft .NET Framework for building Web applications and 
                XML Web services. </div> 
            </ng-template> 
          </e-accordionitem> 
          <e-accordionitem> 
            <ng-template #header> 
              <div>ASP.NET MVC</div> 
            </ng-template> 
            <ng-template #content> 
              <div>The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the 
                model, the view, and the controller. 
              </div> 
            </ng-template> 
          </e-accordionitem> 
          <e-accordionitem> 
            <ng-template #header> 
              <div>JavaScript</div> 
            </ng-template> 
            <ng-template #content> 
              <div>JavaScript (JS) is an interpreted computer programming language.</div> 
            </ng-template> 
          </e-accordionitem> 
        </e-accordionitems> 
      </ejs-accordion> 
    </ng-template> 
 
Regards, 
Karthi 


LUCIANO ALMEIDA PIMENTA
Replied On August 13, 2019 10:50 AM UTC

Thank you!!!!!

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 14, 2019 03:36 AM UTC

Most welcome 😊 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon