0

我正在尝试制作一个动态表单,该表单使用从 max_points 级联到 0 的其他字段的实时数据。

每一行都有一个高低范围,下一个形式的高范围总是前一个-1的低范围。

我在如何操作字段设置中的模型数据时遇到了麻烦。此外,我对如何在每个字段的范围内访问更大的数据模型有点困惑:

{
   type: 'input',
   //want to bind this field to the previous index's low_range -1  
   key: 'high_range',
   className: 'col-xs-4',
   templateOptions: {
     label: 'High Range',
     disabled: true 
   }
   controller: function($scope) {
      //I have access to the element this corresponds to, but haven't found a way to lookup this element in the larger model array
   }
}

理想情况下,第一个元素的高范围是 max_points,然后之后的每个元素都将引用前一个低范围

这是我的现场示例:http: //jsbin.com/behosokoye/edit

4

1 回答 1

0

Does this do what you're looking for? I'm not sure what trouble you were having, but I think this does what you want: http://jsbin.com/lidezi/edit?js,console,output

于 2015-08-12T12:38:13.597 回答