From 984598314f4a0081c7207fa114cf9edb35fc5662 Mon Sep 17 00:00:00 2001 From: Ivaylo Gochkov Date: Wed, 18 Dec 2013 12:08:02 +0100 Subject: [PATCH] Hogan variable Declared Hogan variable to mock Hogan template engine definitions. --- typeahead/typeahead-tests.ts | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/typeahead/typeahead-tests.ts b/typeahead/typeahead-tests.ts index ee41ea3f5..dee467e0f 100644 --- a/typeahead/typeahead-tests.ts +++ b/typeahead/typeahead-tests.ts @@ -4,6 +4,7 @@ // // Examples from http://twitter.github.com/typeahead.js/examples // +declare var Hogan: any; // Countries // Prefetches data, stores it in localStorage, and searches it on the client @@ -15,16 +16,16 @@ $('.example-countries .typeahead').typeahead({ // Open Source Projects by Twitter // Defines a custom template and template engine for rendering suggestions -//$('.example-twitter-oss .typeahead').typeahead({ -// name: 'twitter-oss', -// prefetch: '../data/repos.json', -// template: [ -// '

{{language}}

', -// '

{{name}}

', -// '

{{description}}

' -// ].join(''), -// engine: Hogan -//}); +$('.example-twitter-oss .typeahead').typeahead({ + name: 'twitter-oss', + prefetch: '../data/repos.json', + template: [ + '

{{language}}

', + '

{{name}}

', + '

{{description}}

' + ].join(''), + engine: Hogan +}); // Arabic Phrases // Hardcoded list showing Right - To - Left(RTL) support @@ -61,12 +62,12 @@ $('.example-sports .typeahead').typeahead([ // Best Picture Winners // Prefetches some data then relies on remote requests for suggestions when prefetched data is insufficient -//$('.example-films .typeahead').typeahead([ -// { -// name: 'best-picture-winners', -// remote: '../data/films/queries/%QUERY.json', -// prefetch: '../data/films/post_1960.json', -// template: '

{{value}} – {{year}}

', -// engine: Hogan -// } -//]); \ No newline at end of file +$('.example-films .typeahead').typeahead([ + { + name: 'best-picture-winners', + remote: '../data/films/queries/%QUERY.json', + prefetch: '../data/films/post_1960.json', + template: '

{{value}} – {{year}}

', + engine: Hogan + } +]);