I have a view model object . Here it is.
a{ b : {name : "p",id : "q", type : "text"} }
Here is my view.
<table data-template="myTemplate" data-bind="source: a"></table>
<script type="text/x-kendo-template" id="leadFieldsTemplate">
<tr>
<td>
<input class="k-input k-textbox" data-bind=" attr: b " />
</td>
</tr>
</script>
But above method not working.
Then I change it to like this
<script type="text/x-kendo-template" id="leadFieldsTemplate">
<tr>
<td>
<input class="k-input k-textbox" data-bind=" attr: {name : b.name , id : b.id , type : b.type } " />
</td>
</tr>
</script>
Then it is working. So why the first method not working ???
In all time do I have to mentioned the attributes in the input field before bind them ??
Thank you