typeahead.js
typeahead.js copied to clipboard
TypeError: Bloodhound is undefined
I am using typeahead.bundle.js having version 0.11.1. I have used it like given below:
var posts = new Bloodhound({
datumTokenizer: function(search_data) {
return Bloodhound.tokenizers.whitespace(search_data.value);
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: search_data
});
I have included typeahead.bundle.js using require.js that is including this file before executing above code. When page loads, getting an error:
TypeError: Bloodhound is undefined
At line: queryTokenizer: Bloodhound.tokenizers.whitespace,
I am clueless whats going wrong here. Please help.
@gokulphp Do you have a jsfiddle with this issue? I am not able to reproduce this issue by including jquery.js and typeahead.bundle.js
Have you solved this problem? I have the same problem. with using requirejs