Kendo UI Tabstrip select tab on angular data loaded/ready

1,646 views
Skip to first unread message

Sean Amoroso

unread,
Feb 28, 2014, 2:39:43 PM2/28/14
to ang...@googlegroups.com
First time making a plunkr, so I was terrible at it, but here it is:  http://plnkr.co/edit/znCQPq0aiiV1nMYf2F3a?p=preview

The basic gist is I want to load content from an HTML file that is contained with its own controller/scope.  When the main controller is done loading, I want to make the first tab visible and selected.  I got my app to a point where it would select the tab but the angular data wasn't applied yet.  So instead of saying the horrible text inside, it would just say {{variable}} instead.  

In short, can anyone seemingly point me in the right direction to just have the first tab load after angular is ready and loaded.  Is it a simple declaration needed, do I need to wait for an event?

I have this code to select it but don't think I'm firing it in the right time/event:

var tabstrip = $("#tabstrip").kendoTabStrip().data("kendoTabStrip");
tabstrip.select(0);

Ignore the text displays, I need to humor myself somehow learning this!

Sean Amoroso

unread,
Feb 28, 2014, 4:59:10 PM2/28/14
to ang...@googlegroups.com
I can't seem to get the plunkr to update properly, but I fixed this in my app by modifying the select to also activate:

var tabstrip = $("#tabstrip"); 
tabstrip.data("kendoTabStrip").activateTab(0);
tabstrip.data("kendoTabStrip").select(0);

If anyone knows a better way, I'm all ears.
Reply all
Reply to author
Forward
0 new messages