AngularJS的Kendo Tab Strip事件

时间:2016-05-20 09:55:44

标签: angularjs kendo-ui kendo-tabstrip

我有以下标签

<div kendo-tab-strip  k-options="tabStripOptions">
            <ul>
                <li class="k-state-active">First tab</li>
                <li>Second tab</li>
            </ul>

            <div style="padding: 1em">
                This is the first tab
            </div>

            <div style="padding: 1em">
                This is the second tab
            </div>
        </div>

在我的控制器中,我为事件编写了以下代码:

$scope.tabStripOptions = {
            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);
            }
        };

但是没有选项卡是创建但是如果我从k-options="tabStripOptions"删除<div>,那么Tab即将到来,但没有事件。

0 个答案:

没有答案