2016-11-25 122 views
0

我想在kendo面板欄項目中添加按鈕。 這可能嗎?將按鈕添加到kendo-ui面板欄項目

<kendo-panelbar> 
    <kendo-panelbar-item title="Heroes" > 
       <kendo-panelbar-item *ngFor="let hero of heroes" title={{hero.name}} > 

       //add buttons here 

       </kendo-panelbar-item> 
    </kendo-panelbar-item> 
</kendo-panelbar> 

回答

1

我看不到在PanelBar項目中添加按鈕的問題。

<kendo-panelbar> 
     <kendo-panelbar-item title="My Teammates" expanded="true"> 
      <template kendoPanelBarContent> 
       <button kendoButton>Button</button> 
      </template> 
     </kendo-panelbar-item> 
    </kendo-panelbar> 

看到這個plunkr

+0

我沒有使用最新版本的劍道佈局的。在更新和實現你的代碼之後。 我已經更新了這個plunkr,問題是我可以在hero.name旁邊添加一個按鈕嗎? Plunker:http://plnkr.co/edit/tu9kZRjca9YC1dz6lYlZ?p=preview –

+0

此功能將作爲此問題的一部分實施:https://github.com/telerik/kendo-angular2/issues/85 – knikolov

0

這不是模板,但NG-模板

<ng-template kendoPanelBarContent> 
 
       <button kendoButton>Button</button> 
 
</ng-template>

相關問題