Search code examples
jqueryknockout.jsjquery-templates

KnockoutJS templates: error 'Your version of jQuery.tmpl is too old - jQuery.tmpl 1.0.0pre'


I'm getting the above error using the latest KnockoutJS library using v1.3.0beta. However, this is clashing with the following jquery template file:

//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js

Where can I find the CDN version of Jquery.tmpl 1.0.0pre? Also what worries me is Jquery template's homepage states that it is no longer in development and not actively supported.


Solution

  • I was not able to locate a newer version of jQuery.tmpl on cdn.

    However, Knockout 1.3 (in RC right now) includes a native template engine. This means that you can use Knockout with templates without referencing a template engine like jQuery.tmpl.

    Here are a couple of posts to help describe it until the docs are ready: http://blog.stevensanderson.com/2011/08/31/knockout-1-3-0-beta-available/ http://www.knockmeout.net/2011/09/ko-13-preview-part-1-native-template.html

    You would not be able to use jQuery.tmpl specific syntax (${variable}, {{each}}, etc.), but the control-flow bindings along with the standard bindings are a mostly equivalent experience.

    KO does plan to support jsRender (the successor to jQuery templates) as well when its is stable.