Allows dynamic loading of HTML views (fragments)
JavaScript HTML CSS
Latest commit 4ebe7ec Aug 8, 2015 @techarch Merge pull request #3 from timgluz/patch-1
Fixed invalid bower.json
Failed to load latest commit information.
demo Updated reference to the library in the demo app now that it exists o… Nov 24, 2011
jquery.viewloader.min.js Narrowed down the scope of the search for embedded script templates t… Nov 29, 2011

jQuery ViewLoader

ViewLoader allows you to break up a page into multiple views using your template engine of choice (e.g. jQuery Template or jsView), each loaded and rendered dynamically. When combined with KnockoutJS you can have each view be data-bound to a view model.


    logLevel: "debug",

   afterEachTemplate: function (templateId) { 
      // code to execute after each view has been successfully loaded

   success: function (successfulResolution) {
      // Code to execute once all views have been loaded for the page

   error: function (failedResolution) {
      // Code to execute if an error occurs while loading the views 



See the demo folder for a complete example. The demo consists of:

  1. An index.html containing 2 views, each view has a subview
  2. Four separate view files (with the .view.html extension)
  3. An application.js with an InitializeApplication function initializing the ViewLoader

(c) 2011 Philippe Monnet (@techarch)