mercredi 29 août 2018

Kendo Angular Tabstrip wrapper

I want to wrap kendo tab strip to have all the tabs in one place and whenever I wanted to change the tab component just change one place. With that in mind I started to wrap kendo tab strip but it doesn't work. I'm really confused at this point. this is my code :
custom-tab-strip.html

<kendo-tabstrip>
  <ng-content></ng-content>
</kendo-tabstrip>

custom-tab-component.html:

<kendo-tabstrip-tab [title]="title" [selected]="selected">
  <ng-template kendoTabContent>
    <ng-content></ng-content>
  </ng-template>
</kendo-tabstrip-tab>

Where title and selected are inputs in this component.
At last I use these components as follows:

<app-custom-tab-strip>
    <app-custom-tab [title]="'title'" [selected]="true">
        test
    </app-custom-tab>
</app-custom-tab-strip>

Can anyone help me to find the problem of my code?




Aucun commentaire:

Enregistrer un commentaire