I'm not sure if I'm doing something conceptually wrong, but I'd like to use a predefined model and fill it with data form a remote request through DataSource AND the same model inside a view for exposing it's data in HTML.
Right now, I'm doing something like that:
As soon as I use the binding inside the view, I'm getting an "Uncaught TypeError: Cannot read property 'get' of undefined" from kendo.mobile.min.js.
Am I doing this wrong (or too complicated?).
As a work-around, I changed it to:
which works fine, but I'd prefer to bind it.
Thanks in advance for any help on this.
Right now, I'm doing something like that:
ModelUserProfile: kendo.data.Model.define({
id: "userId"
,fields: {
,firstName: { type: "string" }
,lastName: { type: "string" }
...
}
});
var datasource = new kendo.data.DataSource({
...
schema: {
model: ModelUserProfile
},
...
});
<
div
id
=
"show-userprofile"
data-role="view"
data-model="ModelUserProfile"
data-layout
=
"default"
>
...
</
div
>
<
script
id
=
"templateUserprofile"
type
=
"text/x-kendo-template"
>
...
<
div
data-bind
=
"visible: firstName"
>Vorname:</
div
>
...
</
script
>
As soon as I use the binding inside the view, I'm getting an "Uncaught TypeError: Cannot read property 'get' of undefined" from kendo.mobile.min.js.
Am I doing this wrong (or too complicated?).
As a work-around, I changed it to:
# if (firstName) { # <
div
>Vorname:</
div
> # } #
Thanks in advance for any help on this.