jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 94 forks source link

Load knockout-module with AMD #251

Closed genusP closed 6 years ago

genusP commented 8 years ago

I load knockoutjs as AMD-module. When i added jaydatamodules/knockout then throws error: Knockout js is required

robesz commented 8 years ago

Hi @genusP , could you please share your requirejs config?

robesz commented 8 years ago

You can find an example configuration file here - https://github.com/jaystack/jaydata-odata-example/blob/master/app/main.js

genusP commented 8 years ago

Hi @robesz.

requirejs.config({
    baseUrl: "/Scripts/",
    paths: {
        "jquery": "libs/jquery/dist/jquery",
        "knockout": "libs/knockout/dist/knockout.debug",
        "jaydata/core": "jaydata/jaydata",
        "jaydata/odata": "jaydata/jaydataproviders/oDataProvider",
        "jaydata/modules/knockout": "jaydata/jaydatamodules/knockout",
        "jaydatacontext": "../jaydatacontext"
    }
});

require(["jquery", "knockout","jaydata/modules/knockout"],
    function ($, ko) {
});