[英]How to bind angular controller to the tab content in kendo tabstrip
I use KendoTabStrip and KendoGrid to create my page. 我使用KendoTabStrip和KendoGrid来创建我的页面。 There're several tabs in my TabStrip, each tab's content is a grid.
我的TabStrip中有几个选项卡,每个选项卡的内容都是一个网格。 I put each grids in a separate html file and use contentUrl to load them, like this
我将每个网格放在单独的html文件中,然后使用contentUrl加载它们,如下所示
http://demos.telerik.com/kendo-ui/tabstrip/ajax http://demos.telerik.com/kendo-ui/tabstrip/ajax
But it looks like if I bind angular controller in each files doesn't work. 但是,如果我在每个文件中绑定Angular Controller似乎无法正常工作。 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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.