I m binding data using this code:
<a class="btnAttach" href="#" data-bind="attr:{'data-mmid':mm_id}" >
My data object is:
{
"mm_id": 1
account: {
"accId": "Acc1"
"accName": "Az Corp"
}
}
I need to modify binding. Currently code binds mm_id
as an "data-mmid" attribute. But I need to add another attribute accId
as separate data-accId attribute. Probably i can't have 2 data-bind
. Please can you guide how to do this ? Another catch is account
object can be null too. So further complaxity is how to do null check and create 2 attributes.
I highly appreciate your help and time.
please check the above code.