use*_*698 1 kendo-ui angularjs kendo-tabstrip
我使用角度js在我的应用程序中使用kendo tabstrip.标签和内容看起来很好.
我可以通过k选项获取从角度或设置事件调用的选项卡事件吗?
需要帮助
我使用无范围,但与Joe提到的一样......
HTML:如果你使用$ scope,只需删除"vm".
<div kendo-tab-strip="vm.tabstrip" k-options="vm.tabOptions" k-content-urls="[null, null]">
Run Code Online (Sandbox Code Playgroud)
控制器:(如果你使用$ scope,只需用"$ scope"替换"vm"
vm.tabOptions = {
select: function (e) {
console.log("Selected: " + e.item.innerText);
},
activate: function (e) {
console.log("Activated: " + e.item.innerText);
},
show: function (e) {
console.log("Shown: " + e.item.innerText);
},
contentLoad: function (e) {
console.log("Content loaded in " + e.item.innerText);
},
error: function (e) {
console.log("Loading failed with " + e.xhr.statusText + " " + e.xhr.status);
}
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3731 次 |
| 最近记录: |