From 3bc2ccdfdfeed0b17e2c17bf0228782d82b1b726 Mon Sep 17 00:00:00 2001 From: sanemat Date: Tue, 11 Feb 2014 00:30:05 +0900 Subject: [PATCH 1/3] Add angular-typeahead, resolve jquery 1.10.2 --- bower.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 663103d..610f1a8 100644 --- a/bower.json +++ b/bower.json @@ -14,13 +14,15 @@ "sass-bootstrap": "~3.0.2", "angularytics": "~0.2.3", "uri.js": "~1.12.0", - "angular-social": "~0.1.1" + "angular-social": "~0.1.1", + "angular-typeahead": "~0.0.12" }, "devDependencies": { "angular-mocks": "1.2.12", "angular-scenario": "1.2.12" }, "resolutions": { - "angular": "1.2.12" + "angular": "1.2.12", + "jquery": "~1.10.2" } } From c51eceb0f93229ce2f889f5212d21a14612e800e Mon Sep 17 00:00:00 2001 From: sanemat Date: Tue, 11 Feb 2014 00:31:28 +0900 Subject: [PATCH 2/3] Add typeahead by `grunt build` --- app/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/index.html b/app/index.html index 63bc479..793c29c 100644 --- a/app/index.html +++ b/app/index.html @@ -78,6 +78,8 @@ + + From af5a5a42d5de295a31cebdb3acf9ea4b2ec5c223 Mon Sep 17 00:00:00 2001 From: sanemat Date: Tue, 11 Feb 2014 01:19:03 +0900 Subject: [PATCH 3/3] Use sfTypeahead --- app/scripts/app.js | 8 +++++++- app/views/header.html | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/scripts/app.js b/app/scripts/app.js index e1f93e5..a0d4a20 100644 --- a/app/scripts/app.js +++ b/app/scripts/app.js @@ -7,7 +7,8 @@ angular.module('handCoolerApp', [ 'ngRoute', 'mgcrea.ngStrap', 'angularytics', - 'ngSocial' + 'ngSocial', + 'siyfion.sfTypeahead' ]) .config(function ($routeProvider) { $routeProvider @@ -35,6 +36,11 @@ angular.module('handCoolerApp', [ $scope.doSearch = function (query) { $location.path('/search/' + query); }; + $scope.exampleData = { + name: 'accounts', + remote: 'http://cornflower.herokuapp.com/rubygems.org/api/v1/search.json?query=%QUERY' + }; + $scope.foo = null; }) .config(function(AngularyticsProvider) { AngularyticsProvider.setEventHandlers(['Console', 'GoogleUniversal']); diff --git a/app/views/header.html b/app/views/header.html index 9d25d78..771c6a1 100644 --- a/app/views/header.html +++ b/app/views/header.html @@ -13,7 +13,8 @@
- +
+