Link declared in a template, error when firing click event

2 posts, 0 answers
  1. T
    T avatar
    1 posts
    Member since:
    Aug 2014

    Posted 06 Sep 2014 Link to this post


    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.

    <div data-role="view" id="componentOverview" data-title="Component Overview" data-model="APP.componentOverview.model" data-init="" data-after-show="">
        <h1>Component Overview</h1>
        <ul data-role="listview" data-style="inset" data-bind="source:components" data-template="componentsTemplate"></ul>
    <script type="text/x-kendo-template" id="componentsTemplate">
        <a data-bind="click: onComponentSelect">#: title#</a>

    ], function (View, html, app) {
        var model = kendo.observable({
            onComponentSelect: function(e) {
                var compId =;
                app.instance.navigate('componentDetail?id=' + compId);
        var events = {
            init: function (e) {
            show: function (e) {
            afterShow: function (e) {
        return new View('componentOverview', html, model, events);
  2. Petyo
    Petyo avatar
    2437 posts

    Posted 10 Sep 2014 Link to this post


    the view definition does not seem familiar to me, but I assume that this is your own abstraction. Based on the snippet, I prepared the following example, and it seems to work as expected. Perhaps I am missing something? 


    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top