Search code examples
javascriptjqueryknockout.jsjsfiddle

How to load KnockoutJS in JSFiddle


I've tried to load Knockout in my JSFiddle through an external reference and script element. In both cases the whole page gets stuck and keeps loading.

Although it's interesting that it does load the html elements and show the error: "ReferenceError: ko is not defined".

That suggests that the executor does continue after the script load.

<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js"></script>

Solution

  • There exists a preset. In the JavaScript editor, click the JavaScript button, and select KnockoutJS from "Frameworks & extensions".

    1:

    Screenshot 1

    2:

    enter image description here