如何在limitTo angular js

时间:2015-05-28 07:22:12

标签: javascript angularjs

我想在limitTo

中传递动态$ scope变量

我的数据数组看起来像

data = [ key1:'ab',key2:'cd',key3:'ef' ];

================================

<div ng-repeat="(key,value) in data">
<div>
<label>
{{key}}
</label>
</div>
<div ng-repeat="(key1,value1) in value | limitTo: {{key}}_No">
{{key1}}
</div>
</div>

现在问题是如何在limitTo中传递动态键意味着“{{key}} _ No”

我想导致html

<div ng-repeat="(key1,value1) in value | limitTo: key1_No">
    {{key1}}
    </div>
<div ng-repeat="(key1,value1) in value | limitTo: key2_No">
    {{key1}}
    </div>
<div ng-repeat="(key1,value1) in value | limitTo: key3_No">
    {{key1}}
    </div>

我怎样才能实现这个目标?

0 个答案:

没有答案