请让我知道选择事件上 angular 2 选项卡的确切语法。我正在尝试如下内容:
@Component({
selector: 'my-app',
template: `
<kendo-tabstrip>
<kendo-tabstrip-tab [title]="'Paris'" (select)="onTabSelected()">
<span class="rainy"> </span>
<div class="weather">
<h2>17<span>ºC</span></h2>
<p>Rainy weather in Paris.</p>
</div>
</kendo-tabstrip-tab>
<kendo-tabstrip-tab [title]="'New York'" (select)="onTabSelected()">
<span class="sunny"> </span>
<div class="weather">
<h2>29<span>ºC</span></h2>
<p>Sunny weather in New York.</p>
</div>
</kendo-tabstrip-tab>
</kendo-tabstrip>
`
})
class AppComponent {
public onTabSelected() {
console.log('index');
}
}
但这对我不起作用。