Templating is a killer feature of many technologies that helps reduce code and make it more manageable and adaptable. Knockout.js has a native template engine (or you can tie in a custom templating engine), but often I like to go a bit further and load my templates from external files. In this month’s Papa’s Perspective column in Visual Studio Magazine I cover the Knockout.js External Template Engine and how it makes using external templates with Knockout.js a breeze. Check it out.
Jim Cowart wrote this library, pushed it to github, and created a NuGet package for it, so there’s no reason not to use it . Just search for “Knockout” and you will find it in NuGet.
I talk more Jim’s templating library and several ways to use templates with Knockout in my in depth Knockout course at Pluralsight. So if you want to learn more, check out Building HTML5 and JavaScript Apps with MVVM and Knockout.