0

I use RequireJS to load Kendo according to this and it works. jQuery is loaded first, then Kendo. But I got an error "kendoButton is not a function". Here is my app.js

require.config({
    paths: {
        "jquery": "lib/kendo-ui/jquery.min",
        "jquery-ui": "lib/jquery-ui.min",
        "kendo-ui": "lib/kendo-ui" // this is a directory containing all Kendo files
    },
    shim: {
        "kendo-ui/kendo.button.min": {
            deps: ["jquery"]
        },
        "kendo-ui/kendo.core.min": {
            deps: ["jquery"]
        }
    }
});

require(["jquery", "kendo-ui/kendo.core.min", "kendo-ui/kendo.button.min"],
function ($)
{
    $("#primaryTextButton").kendoButton();
});

Kendo troubleshooting says that jQuery should be included just once (yes, I have) and all the required Kendo files are included (yes, I included kendo.core.min.js).

I use RequireJS 2.2.0, Kendo 2016.1.226, and jQuery version, which is included in the Kendo package. Can someone point out what's wrong?

Community
  • 1
  • 1
springrolls
  • 1,331
  • 1
  • 14
  • 40

1 Answers1

0

Set the baseURL to "js/kendo".

I'm not sure if this has been stated clearly in the documentation. I thought the URL in this example is well, an example, but it turns out to be important.

springrolls
  • 1,331
  • 1
  • 14
  • 40