Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 1.06 KB

README.md

File metadata and controls

21 lines (17 loc) · 1.06 KB

KoTemplater

A (very simple) template engine for using Knockout as the templating engine for Twitter Typeahead.

Simply include the koTemplater.js file before you need to use the engine.

From the typeahead examples page:

$('.example-twitter-oss .typeahead').typeahead({                              
  name: 'twitter-oss',                                                        
  prefetch: '../data/repos.json',                                             
  template: [                                                                 
    '<p class="repo-language" data-bind="text: language"></p>',                              
    '<p class="repo-name" data-bind="text: name"></p>',                                      
    '<p class="repo-description" data-bind="text: description"></p>'                         
  ].join(''),                                                                 
  engine: KoTemplater                                                               
});