4

I'm basically new to Angular world. But trying hard to get the phase.

What problem I now have is, how to access kendo tabstrip in my JS file and activate second tab onClick().

Please note I do not want to use selectors i.e., #tabStripID

I'm trying to see if there is any way to do it?

pl find the plunker http://plnkr.co/edit/6l8R4ggLxOA589IcbRK9?p=preview

Looking for the help.

Thanks, Sammi

scniro
  • 16,844
  • 8
  • 62
  • 106
Sammi
  • 109
  • 3
  • 11

1 Answers1

5

In your HTML change

<div id="tabstrip" kendo-tab-strip>

with

<div id="tabstrip" kendo-tab-strip="tabstrip">

And change your controller as below

  $scope.activateSecondTab = function() {
    $scope.tabstrip.select(1);
  };

I saved a working example at http://embed.plnkr.co/OjKwKRjupDWwNPifqzm2/preview

Enjoy!

savarex
  • 101
  • 4
  • 2
    Ok got it working but I had it put this call into an event listener to make it work. `$scope.$on("kendoRendered", function (e) { vm.tabstrip.select(1); });` – Mastro Feb 09 '15 at 20:12