Skip to main content

hi i have an api that takes its value from db. In my api i have a drop down -menu and i have certain categories like food , healthcare and in the drop down the categories gets repeated what should i do to make the drop down categories unique. And i have to do it with angular js since all the functionalities are based on angular js.<div class="span3"> <div class="input-append"> <input class="span2" id="brandSearch" data-ng-model="brand" type="text" placeholder="Search"> <div class="btn-group"> <button class="btn dropdown-toggle" data-toggle="dropdown"> Brand <span class="caret"></span> </button> <ul class="dropdown-menu"> <div id="divBrandId{{$index+1}}" ng-repeat="coupon in coupons | filter" onclick="javascript:assignTextValueBrand('{{$index+1}}');" onmouseover="this.style.background='violet';this.style.color='white';" onmouseout="this.style.background='white';this.style.color='black';"> {{xxxx.brand}} </div> </ul> </div> </div> </div>

<div class="span3">
    <div class="input-append">
        <input class="span2" id="brandSearch" data-ng-model="brand" type="text" placeholder="Search">
        <div class="btn-group">
            <button class="btn dropdown-toggle" data-toggle="dropdown">
                Brand
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                   <div id="divBrandId{{$index+1}}" ng-repeat="coupon in coupons | filter" onclick="javascript:assignTextValueBrand('{{$index+1}}');" onmouseover="this.style.background='violet';this.style.color='white';" onmouseout="this.style.background='white';this.style.color='black';"> {{xxxx.brand}}
                   </div>
            </ul>
        </div>
    </div>
</div>

hi i have an api that takes its value from db. In my api i have a drop down -menu and i have certain categories like food , healthcare and in the drop down the categories gets repeated what should i do to make the drop down categories unique. And i have to do it with angular js since all the functionalities are based on angular js.<div class="span3"> <div class="input-append"> <input class="span2" id="brandSearch" data-ng-model="brand" type="text" placeholder="Search"> <div class="btn-group"> <button class="btn dropdown-toggle" data-toggle="dropdown"> Brand <span class="caret"></span> </button> <ul class="dropdown-menu"> <div id="divBrandId{{$index+1}}" ng-repeat="coupon in coupons | filter" onclick="javascript:assignTextValueBrand('{{$index+1}}');" onmouseover="this.style.background='violet';this.style.color='white';" onmouseout="this.style.background='white';this.style.color='black';"> {{xxxx.brand}} </div> </ul> </div> </div> </div>

hi i have an api that takes its value from db. In my api i have a drop down -menu and i have certain categories like food , healthcare and in the drop down the categories gets repeated what should i do to make the drop down categories unique. And i have to do it with angular js since all the functionalities are based on angular js.

<div class="span3">
    <div class="input-append">
        <input class="span2" id="brandSearch" data-ng-model="brand" type="text" placeholder="Search">
        <div class="btn-group">
            <button class="btn dropdown-toggle" data-toggle="dropdown">
                Brand
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                   <div id="divBrandId{{$index+1}}" ng-repeat="coupon in coupons | filter" onclick="javascript:assignTextValueBrand('{{$index+1}}');" onmouseover="this.style.background='violet';this.style.color='white';" onmouseout="this.style.background='white';this.style.color='black';"> {{xxxx.brand}}
                   </div>
            </ul>
        </div>
    </div>
</div>
Source Link

eliminate duplicates in the drop down menu using angular ui unique

hi i have an api that takes its value from db. In my api i have a drop down -menu and i have certain categories like food , healthcare and in the drop down the categories gets repeated what should i do to make the drop down categories unique. And i have to do it with angular js since all the functionalities are based on angular js.<div class="span3"> <div class="input-append"> <input class="span2" id="brandSearch" data-ng-model="brand" type="text" placeholder="Search"> <div class="btn-group"> <button class="btn dropdown-toggle" data-toggle="dropdown"> Brand <span class="caret"></span> </button> <ul class="dropdown-menu"> <div id="divBrandId{{$index+1}}" ng-repeat="coupon in coupons | filter" onclick="javascript:assignTextValueBrand('{{$index+1}}');" onmouseover="this.style.background='violet';this.style.color='white';" onmouseout="this.style.background='white';this.style.color='black';"> {{xxxx.brand}} </div> </ul> </div> </div> </div>