I had an issue when using Knockout JS version 3.0.0rc. It seems that the "rc" causes the internal variable "versions.knockout" to be undefined. I fixed the issue by downloading KnockoutJS version 3.0.0 and that fixed the issue. Below is the code where I ran into the issue:
The error I received was " throw new Error('knockout must be loaded before knockout-jquery.');"
(function () {
// dependency checks
if (!versions.jQuery) {
throw new Error('jQuery must be loaded before knockout-jquery.');
}
if (!versions.jQueryUI) {
throw new Error('jQuery UI must be loaded before knockout-jquery.');
}
if (!versions.knockout) {
throw new Error('knockout must be loaded before knockout-jquery.');
}
if (versions.jQueryUI !== '1.8' && versions.jQueryUI !== '1.9' && versions.jQueryUI !== '1.10') {
throw new Error('This version of the jQuery UI library is not supported.');
}
if (versions.knockout !== '2.2' && versions.knockout !== '2.3' && versions.knockout !== '3.0') {
throw new Error('This version of the knockout library is not supported.');
}
}());
Just a heads up.
I had an issue when using Knockout JS version 3.0.0rc. It seems that the "rc" causes the internal variable "versions.knockout" to be undefined. I fixed the issue by downloading KnockoutJS version 3.0.0 and that fixed the issue. Below is the code where I ran into the issue:
The error I received was " throw new Error('knockout must be loaded before knockout-jquery.');"