got autocomplete presented correctly

This commit is contained in:
Henry Oswald
2014-06-13 17:17:58 +01:00
parent b9afde591b
commit 09f5a67f9b
2 changed files with 16 additions and 3 deletions
@@ -1,9 +1,12 @@
define ["libs/angular"], (a)->
define ["libs/algolia", "libs/typeahead", "libs/angular"], (algolia)->
app = angular.module("userProfileInformationApp", [])
app.controller "UpdateForm", ($scope, $http)->
app.factory "Institutions", ->
new AlgoliaSearch("SK53GL4JLY", "75dc5e65794cd47eb7f725e6bb5075be").initIndex("institutions")
app.controller "UpdateForm", ($scope, $http, Institutions)->
$scope.institutions =
$scope.hidePersonalInfoSection = true
$http.get("/user/personal_info").success (data)->
@@ -30,5 +33,9 @@ define ["libs/angular"], (a)->
results = _.filter $scope.userInfoForm, (value)-> value? and value?.length != 0
results.length * 20
$scope.updateInstitutionsList = ->
Institutions.search $scope.userInfoForm.institution, (err, response)->
$scope.institutions = response.hits
angular.bootstrap(document.getElementById("userProfileInformation"), ['userProfileInformationApp'])