0

我使用選擇標籤顯示下拉菜單。在選項標籤中,我正在做ng-repeat。如果在ng-repeat,有一個很長的字符串假設maxlength=255,我怎麼能闖入線。因爲它溢出了屏幕。選擇選項超出顯示

screenshot

<div class="col-sm-5"> 
    <select id="alert" name="alert" ng-model="dropdownSelectedRegion" ng-change="regionSelected(dropdownSelectedRegion)" class="admin-select-btn sans-regular-11 disposition" required> 
    <option value="">Select</option> 
    <option value="{{region.id}}" ng-selected="dropdownSelectedRegion==region.id" ng-repeat='region in RegionList'>{{region.description | subStringFilter}}</option> 
    </select> 
</div> 
+1

請分享代碼的完整作品。另外,請包括** CSS(最好** JS **)以及因爲它聽起來像你的解決方案應該在css – Thatkookooguy

回答

0

通常你不能做到這一點與html打破,通常我設置標題屬性爲long text和使用短description我的價值。

<option value="1" title="Huge Description">your value</option> 

這裏找到了小提琴,它可以幫助你:

http://jsfiddle.net/ZTs42/2/

+0

中解決我也嘗試過。但它不適用於動態數據。 –

+0

你的意思是小提琴...... @NarasinghaPadhi – Thalaivar

+0

是的。究竟。如果我渲染動態數據,它不適合我 –