使用angularjs预填充选择框

时间:2016-11-04 14:57:29

标签: angularjs drop-down-menu

在此示例中,默认情况下未选择预定义项。请帮助实现这一目标。

completed projects

在row.choosenItem属性中选择的数据($ scope.rows)项目中。仍然没有用choosenItem填充选择框。

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Zeile As Long
Set Target = Intersect(Target, Range("J1:J1000"))
If Target Is Nothing Then Exit Sub
If Target = "erledigt" Then
Zeile = Target.Row
Range(Cells(Zeile, 3), Cells(Zeile, 10)).Copy _
Destination:=Sheets("erledigte Projekte").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Target.EntireRow.Delete
End If
End Sub

Example code here

1 个答案:

答案 0 :(得分:0)

基本上,当使用ngOptions语法为value as text for item in array时 - 请记住这一点,定义您的值:

ng-init="row.selected = row.choosenItem.id" ng-options="item.id as item.name for item in list"
相关问题