Kendo UI Tabstrib Select Tab from Data Bind

767 views Asked by At

We using angular and kendo tab datasource to create kendotabstrip in HTML. Is there a way to select a default tab on load from k-data events. We can do it using jquery but looking for a way to select default tab using k-data-bind?

<div id="example" ng-app="KendoDemos">
    <div ng-controller="MyCtrl">
        <div kendo-tab-strip k-content-urls="[ null, null]" k-data-source="tabData" k-data-text-field="'text'" k-data-value-field="'id'" k-options="configOptions">
          <!-- tab list -->
        </div>
    </div>
</div>

<script>
  angular.module("KendoDemos", [ "kendo.directives" ])
      .controller("MyCtrl", function($scope){

    $scope.hello = "Hello from Controller!";
    $scope.tabData = [{id:'1', text:'tab 1'}, {id:'2', text:'tab 2'}];
    $scope.configOptions={select:function(e){console.log(e);}}
  })
</script>

Fiddle for reference. http://jsfiddle.net/6dgxvqvb/

0

There are 0 answers