我有这个:
$('input#tags_watch').typeahead({
highlight: true,
autoselect: true
},
{
source: names.ttAdapter(),
displayKey: 'name',
templates: {
suggestion: Handlebars.compile([
'<div id="{{id}}"><p class="repo-country">{{country}}</p>',
'<p class="repo-name">{{name}}</p>',
'<p class="repo-city">{{city}} - {{ocupation}}</p></div>'
].join(''))
}
});
它总是返回一个错误: 未捕获的错误:缺少输入
我不知道为什么会这样,但是输入存在!!!
JS 小提琴:http: //jsfiddle.net/jhogLbg5/