剑道角标签条包装器



我想包装剑道标签条以将所有选项卡放在一个地方,每当我想更改选项卡组件时,只需更改一个位置。考虑到这一点,我开始包装剑道标签条,但它不起作用。在这一点上,我真的很困惑。这是我的代码:
custom-tab-strip.html

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

自定义选项卡组件.html:

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

其中标题和选择是此组件中的输入.
最后,我使用这些组件如下:

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

谁能帮我找到我的代码问题?

你必须对标题和选定属性使用 @Input(( 和 @output(( 发射器,因为当父组件调用子组件时,您必须为此传递 2 个值,因为它将设置运行时。