i am just copying the demo code which is available on kendo's site but still it is not giving any widget in output, and it is giving the following error -
"TypeError: undefined is not a function" in angular JS.
i have also created a new jsfiddle for it here is the link- http://jsfiddle.net/akki166786/MYe2T/
Do anybody has any idea what is wrong in here? here is my code
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/angular/angularjs.js"></script>
<script src="~/Scripts/angular/underscore.js"></script>
<script src="~/Scripts/Kendo/kendo.all.min.js"></script>
<script src="~/Scripts/angular/angular-kendo.js"></script>
<script>
var myModule = angular.module('myApp', ["kendo.directives"]);
</script>
<div ng-app="myApp">
<div data-kendo data-role="calendar"></div>
<ul data-kendo data-role="dropdownlist" ng-transclude>
<li>element 1</li>
<li>element 2</li>
</ul>
</div>
The error is some thing related to "ng-transclude" because if i remove the dropdownlist portion then i didnt get any error, but still dont get the caledar control also.
I am having the same problem.
It looks like you have based your code on the following page: http://kendo-labs.github.io/angular-kendo/
There are different versions of that library ("angular-kendo.js" file):
- One from example (it looks like it is an older version)
- Another from the github root folder https://github.com/kendo-labs/angular-kendo
- And from the github js folder
Some of the functionality works when pointing to the different/older version.
Edit: Solution is to get html example from the browser source. So just view the source of the page and use that example. It works for me. Examples on the page are old.
来源:https://stackoverflow.com/questions/17066799/why-isnt-my-code-creating-a-kendo-widget