twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

Updating from 2.0.0 to 3.0.2 #212

Closed oshihirii closed 3 years ago

oshihirii commented 9 years ago

Hello,

I had implemented Hogan alongside typeahead.js at these version states:

I updated Hogan to 3.0.2 and it broke functionality.

I updated typeahead to 0.10.5 to see if that resolved the problem and it hasn't.

Can anyone tell me if there are any basic syntactic changes between 2.0.0 and 3.0.2 and how I could remedy these in my base code:

function searchReadyFunction() {
$('.course_lookup .typeahead').typeahead({                              
name: 'courses',
valueKey: 'course_title',  
prefetch: '/static/courses.json',
template: [
'<p class="course_area">[[course_area]]</p>',
'<p class="course_title">[[course_title]]</p>',
'<p class="course_description">[[course_description]]</p>'
].join(''),
engine: Hogan  
}).on('typeahead:selected', function(event, selection) {
var course_name = selection.course_title.toLowerCase();
var href = "/learn/" + course_name;
loadContent(href);
history.pushState('', 'New URL: '+href, href);
});
}

No error messages are being displayed, there is just no functionality.