2014-12-18 1 views
0

위쪽으로 위쪽으로 부 풀림을 열려고합니다. 나는 어떻게 되돌릴 수, 나는 바닥에 "드롭 다운"이 때문에open ui.boostrap typeahead dropdown up

app.controller('TypeaheadCtrl', function($scope, $http) { 
     $scope.selected = undefined; 
     $scope.getLocation = function (val) { 
      return $http.get('http://maps.googleapis.com/maps/api/geocode/json', { 
       params: { 
        address: val, 
        sensor: false 
       } 
      }).then(function (response) { 
       return response.data.results.map(function (item) { 
        return item.formatted_address; 
       }); 
      }); 
     }; 
    }); 

을 app.js

<div class="dropup" ng-controller="TypeaheadCtrl"> 
     <input type="text" ng-model="asyncSelected" placeholder="> Select issue" typeahead="address for address in getLocation($viewValue)" typeahead-loading="loadingLocations" class="form-control inline-edit-form"> 
     <i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i> 
</div> 

index.html을 : 여기

내 코드의 예입니다 열리는? enter image description here

답변

1

같은 문제가있었습니다. 그것은 가장 우아한 해결책이 아니다하지만이 나를 위해 그것을 고정 : 내가했습니다

div.dropup ul { 
    bottom:100% !important; 
    top:auto !important; 
} 
+0

2 세이지만 문제가 해결되어 대단히 감사합니다. – Dillanm

0

사소한 변화가 내가 #로했다

#txtSearch ul.dropdown-menu { 
    bottom:100% !important; 
    top:auto !important; 
} 

(클래스 이름을 발견하는 드롭 다운 메뉴와 dropup되지 않습니다) 드롭 다운해야 할 다른 드롭 다운 메뉴가 있기 때문에 txtSearch가 간단합니다.