Reputation: 21856
Anyone had any succes on getting a template working with the autocomplete?
I tried the example on the site:
template: '<span class="k-state-default"><img src=\"../../content/web/Customers/#:data.CustomerID#.jpg\" alt=\"#:data.CustomerID#\" /></span>' +
'<span class="k-state-default"><h3>#: data.ContactName #</h3><p>#: data.CompanyName #</p></span>',
and a tried about almost any combination in this:
<input kendo-auto-complete k-data-text-field="'$id'"
k-data-source="all_ledger" ng-model="search"
k-template="'data.name'" >
The syntax for kendo angular seems different on this?
Upvotes: 1
Views: 1880
Reputation: 21856
To answer my own question, the correct syntax is:
<input kendo-auto-complete k-data-text-field="'$id'"
k-data-source="all_ledger" ng-model="search"
k-template="
'<span style="display: inline-block; width: 70px;">${ data.$id }</span>
<span>${ data.name }</span>'">
Upvotes: 2