【问题标题】:Angularjs ng-model become one way inside the kendo ui tabstripAngularjs ng-model 成为 kendo ui tabstrip 中的一种方式
【发布时间】:2014-01-01 20:08:01
【问题描述】:
【问题讨论】:
标签:
angularjs
tabs
kendo-ui
【解决方案1】:
Kendo 指令创建一个新范围。你需要有'。在你的 ng 模型中。推荐。
app.controller("myCtrl", function ($compile, $scope) {
$scope.o = {};
$scope.o.testText = 'hello'
$scope.o.testText2 = 'hello2'
});
在你看来
<div id="tabstrip" kendo-tab-strip>
<ul>
<li class="k-state-active">Tab 1</li>
<li>Tab 2</li>
</ul>
<div>
<input type="text" ng-model="o.testText" />
</div>
<div>
[Page 2]
</div>
</div>
<div>
<span>Tab Text </span></span><p>{{o.testText}}</p>
</div>
<span>Outside Tab Text </span>
<input type="text" ng-model="o.testText2" />
<p>{{o.testText2}}</p>
</body>
您可以在
Scope inheritance in Angular