This is a migrated thread and some comments may be shown as answers.

Uncaught TypeError: Object has no method 'observable' (or 'bind')

4 Answers 168 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Luke
Top achievements
Rank 1
Luke asked on 16 Mar 2012, 01:12 PM
Sorry if this is a really dumb question - I'm sure it will be something obvious - but why do I get an Uncaught TypeError when I do kendo.observable (and kendo.bind) in the code below?

Trying to follow the examples but falling at the first hurdle!

Many thanks!

<!DOCTYPE html>
<html>
<head>
    <title>Test page</title>
    <script src="js/kendoui/jquery-1.7.1.js"></script>
    <script src="js/kendoui/kendo.all.js"></script></head>
<body>
    <span data-bind="text: name"></span>
     <script>
        var viewModel = kendo.observable({
            name: "John Doe"
        });
        kendo.bind($("span"), viewModel);
    </script>   
</body>
</html>


4 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 16 Mar 2012, 04:31 PM
Hello Luke,

Your code snippet looks ok, I tried it in this jsFiddle and it works as expected.
Could you please verify what version of KendoUI you are using? MVVM is part of the latest beta release and is not supported in previous versions of the framework.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luke
Top achievements
Rank 1
answered on 19 Mar 2012, 03:54 AM
Thank you Alexander. That nails it! I downloaded the GPL version 2011.3 1123 (Nov 29, 2011) of Kendo UI Web, so that is my problem! It's just a bit confusing that the MVVM examples are included in the zip you get with that version...

No worries though. I will try out the Q1'12 Beta...

Thanks again,
Luke.
0
Markus
Top achievements
Rank 1
answered on 10 Dec 2013, 09:45 AM
Hi all,
I have kendoui.web.2013.3.111 and have the same issue... Is MVVM still in beta?


Regards!
0
Markus
Top achievements
Rank 1
answered on 10 Dec 2013, 09:53 AM
Hi all!
Nevermind! Was referencing wrong javascript file.


Regards,
Valanto
Tags
MVVM
Asked by
Luke
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Luke
Top achievements
Rank 1
Markus
Top achievements
Rank 1
Share this question
or