0

I need to use Twitter Typeahead's template feature so that I can display a long,styled suggestions (example: suburbs with postcodes and postcodes highlighted in blue).

According to twitter docs (https://github.com/twitter/typeahead.js#readme), we need to provide the template with an engine that supports following API calls,

var compiledTemplate = ENGINE.compile(template);

var html = compiledTemplate.render(context);

Can/Have we extend the razor view engine to have these methods?

Otherwise, I need to bring-on something like Hogan, purely to perform templating in typeahead JS

4

1 回答 1

0

Okay, I ended up using the Twitter's Hogan. It was only a few KBs.

于 2013-11-07T04:44:21.527 回答