【发布时间】:2014-07-12 18:30:27
【问题描述】:
我是 AngularJS 的新手,我猜有一个非常基本的问题。
我有一个下拉列表,根据选择,我希望在下面的表格中更新所有信息。
<div ng-controller="RightCtrl as right">
<select ng-model="right.selectedModule">
<option ng-repeat="module in right.modules" value="{{module.id}}">{{module.name}}
</option>
</select>
<table>
<thead>
<th>Right name</th>
<th>Description</th>
</thead>
<tbody ng-repeat="module in right.modules | filter: right.isCurrent">
<tr ng-repeat="selRight in module.rights">
<td right-id="{{selRight.id}}">{{selRight.name}}</td>
<td>
{{selRight.description}}
</td>
</tr>
</tbody>
</table>
</div>
我有一个 jsfiddle (http://jsfiddle.net/EN3S9/) 并感谢每一个帮助。可能我还没有完全理解这个概念。
【问题讨论】:
标签: angularjs 2-way-object-databinding