如何在模板中使用数据源绑定?

How use binding in template with datasource?

我有一个带有函数和数据源的可观察模型。

我无法通过数据源使用模板中的函数。

http://dojo.telerik.com/oHoxI

A kendo.data.DataSource 不是数组;正确的 API 方法是 add:

dataSource.add(...);

(demo)

同样的问题:

this.get("products") // this is not an array, yet you treat it like one

如果要获取数据,使用DataSource.data()方法:

this.get("products").data()