1
我試圖在雙框中獲取選定的值。 與該鏈路REFFERENCE http://www.virtuosoft.eu/code/bootstrap-duallistbox/從bs雙列表中的選定框中獲取值angularJS
我已經做了類似下面的代碼片段:
的.html
<select name="duallistbox_demo1[]"
ng-model="recSchedule"
ng-options="recSchedule as recSchedule.recSchedulingName for recSchedule in recordingSchedules"
size="10"
multiple
bs-duallistbox
selected-list-label="{{ settings.selectedListLabel }}"
non-selected-list-label="{{ settings.nonSelectedListLabel }}">
</select>
JSON文件:
[
{
"id": "1",
"recSchedulingName": "Record Schedule 1"
},
{
"id": "2",
"recSchedulingName": "Record Schedule 2"
},
{
"id": "3",
"recSchedulingName": "Record Schedule 3"
}
]
的.js
console.log($('[name="duallistbox_demo1[]"]').val());
我得到僅此:
["object:326"]
我需要顯示的ID或recSchedulingName這裏。
引導與角度或自定義引導+角? –
帶棱角的bs – MonsterJava