This question is locked. New answers and comments are not allowed.
Hi,
I have a Link declared in a template as shown in the code below. When I click on a link in the listview I get the error: "Uncaught TypeError: Object [object Object] has no method 'apply' "
Thanks in advance.
html:
js:
I have a Link declared in a template as shown in the code below. When I click on a link in the listview I get the error: "Uncaught TypeError: Object [object Object] has no method 'apply' "
Thanks in advance.
html:
<
div
data-role
=
"view"
id
=
"componentOverview"
data-title
=
"Component Overview"
data-model
=
"APP.componentOverview.model"
data-init
=
"APP.componentOverview.events.init"
data-after-show
=
"APP.componentOverview.events.afterShow"
>
<
h1
>Component Overview</
h1
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
data-bind
=
"source:components"
data-template
=
"componentsTemplate"
></
ul
>
</
div
>
<
script
type
=
"text/x-kendo-template"
id
=
"componentsTemplate"
>
<
a
data-bind
=
"click: onComponentSelect"
>#: title#</
a
>
</
script
>
js:
define([
'view/view'
,
'text!view/componentOverview/componentOverview.html'
,
'app'
],
function
(View, html, app) {
var
model = kendo.observable({
components: app.data.components,
onComponentSelect:
function
(e) {
var
compId = e.data.id;
app.instance.navigate(
'componentDetail?id='
+ compId);
}
});
var
events = {
init:
function
(e) {
},
show:
function
(e) {
},
afterShow:
function
(e) {
}
};
return
new
View(
'componentOverview'
, html, model, events);
});