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

TemplateRef not working with Tab

Thread ID:

Created:

Updated:

Platform:

Replies:

148251 Oct 11,2019 11:00 AM UTC Oct 14,2019 09:56 AM UTC Angular - EJ 2 1
loading
Tags: Tab
Evgeny Agusev
Asked On October 11, 2019 11:00 AM UTC

Hello,

I am trying to repeat the HowTo example Adding dynamic items with content reuse but getting an error:

error TS2345: Argument of type '{ header: { text: string; }; content: TemplateRef<any>; }[]' is not assignable to parameter of type 'TabItemModel[]'.


Karthigeyan Krishnamurthi [Syncfusion]
Replied On October 14, 2019 09:56 AM UTC

 
Syncfusion greetings. 
 
Kindly use the below code example to overcome the issue. 
 
public btnClicked(e: any): void { 
    let newtabItem: any = [ 
      { 
        header: { text: "DynamicTabItem" }, 
        content: this.DropDowntemplate 
      } 
    ]; 
    this.tabObj.addTab(newtabItem, 1); 
  } 
 
 
Regards, 
Karthi 
 


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