Selecting tab on page load in AngularJS

2 posts, 0 answers
  1. Jason
    Jason avatar
    22 posts
    Member since:
    Sep 2007

    Posted 30 Aug 2016 Link to this post

    I have a tab strip in AngularJS where I am saving the user's last viewed tab and then trying to programmatically select that tab when they return to the page using ng-class and a scoped variable. This worked in a previous version of kendo UI, but I recently upgraded to the latest version and it no longer works. Here is how it is setup:


     <div kendo-tab-strip="tabStrip" k-content-urls="[null, null]">
                <li ng-class="selectedTab == 'Surveys' ? 'k-state-active' : ''" ng-click="changeSelectedTab('Surveys')">Surveys</li>
                <li ng-class="selectedTab == 'Assigned Surveys' ? 'k-state-active' : ''" ng-click="changeSelectedTab('Assigned Surveys')" >Assigned Surveys</li>          





    The tab will show that it is selected, but the div content does not display. Any suggestions on an possible workaround?



  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 01 Sep 2016 Link to this post


    You can use the kendoWidgetCreated event and select the needed tab. Here is some documentation:

    Kiril Nikolov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top