Wednesday 15 April 2015

knockout.js - printing indexof object as id of html element in knockout js -



knockout.js - printing indexof object as id of html element in knockout js -

in below code need give index of loop id of html input element

<input type="text" data-bind="text:value">

i tried data-bind="text: $index" , cant set id attribute. know how it?

if you're trying set id of element, try:

data-bind="attr: {id: $index}"

html knockout.js

No comments:

Post a Comment