I am working with AppBuilder. Created a new app using the Kendo UI drawer navigation template.
I have a JSON file (originally in data folder but now at root) that looks like this:
[
{
"Name"
:
"Breakfast & Registration"
,
"Location"
:
""
,
"Start"
:
"7:30 am"
,
"End"
:
"8:30 am"
,
"Track"
:
""
,
"Sequence"
: 1
},
{
"Name"
:
"Creating a Successful Audit"
,
"Location"
:
""
,
"Start"
:
"8:30 am"
,
"End"
:
"9:30 am"
,
"Track"
:
"Auditing"
,
"Sequence"
: 2
},
{
"Name"
:
"The Health Insurance and Portability Act"
,
"Location"
:
""
,
"Start"
:
"8:30 am"
,
"End"
:
"9:30 am"
,
"Track"
:
"Compliance"
,
"Sequence"
: 3
}
]
app.js contains models for each of the views. I am working on the agenda view:
// create an object to store the models for each view
window.APP = {
models: {
home: {
title:
'Home'
},
survey: {
title:
'Survey'
},
agenda: {
title:
'Agenda'
,
ds:
new
kendo.data.DataSource({
transport: {
read: {
url:
"agendaSmall.json"
,
dataType:
"json"
}
}
//ds: new kendo.data.DataSource({
//data: [{ id: 1, name: 'Bob' }, { id: 2, name: 'Mary' }, { id: 3, name: 'John' }]
}),
//alert: function(e) {
// alert(e.data.Name);
//}
}
}
};
agenda.html should display these items, but does not
<
div
data-role
=
"view"
data-title
=
"Agenda"
data-layout
=
"main"
data-model
=
"APP.models.agenda"
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
data-template
=
"agendaTemplate"
data-bind
=
"source: ds"
></
ul
>
</
div
>
<
script
type
=
"text/x-kendo-template"
id
=
"agendaTemplate"
>
<
a
data-bind
=
"click: alert"
>#: Name #</
a
>
</
script
>
I have defined the datasource about 10 different ways, based on posts in this and other forums.
I have plugged the JSON directly into the model, and that does display correctly, but is not suitable.
What am I missing?
Thanks,
Scott