Skip to content

A (very simple) template engine for using Knockout with Twitter Typeahead

License

Notifications You must be signed in to change notification settings

GrantDG/KoTemplater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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                                                               
});

About

A (very simple) template engine for using Knockout with Twitter Typeahead

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published