简体   繁体   中英

How to bind angular controller to the tab content in kendo tabstrip

I use KendoTabStrip and KendoGrid to create my page. There're several tabs in my TabStrip, each tab's content is a grid. I put each grids in a separate html file and use contentUrl to load them, like this

http://demos.telerik.com/kendo-ui/tabstrip/ajax

But it looks like if I bind angular controller in each files doesn't work. The code for tab content looks like this:

 <div class="k-content" ng-controller="testCtrl"> <div class="data-grid" id="testGrid"> </div> </div> 

The controller seems doesn't been binded. Anyone can help?

Try this

<div ng-controller="MyCtrl">
            <div kendo-tab-strip k-content-urls="[ null, null]">
              <!-- tab list -->
              <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>
        </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM