I have a css class 'suggestions-list'in which I have height: initial; in my angularjs code in a condition I want to change height: inherit; how can I modify this css class using angular?
in my CSS file I have :
.suggestions-list {
position: absolute;
list-style-type: none;
margin: 0 0 0 35px;
padding: 0;
overflow: scroll;
height: initial;
width: 250px;
border-bottom: 50px;
}
and this is my HTML:
<ul class="suggestions-list" ng-show="myVar">
<li ng-repeat="suggestion in suggestions track by $index" ng-class="{active : selectedIndex === $index}" ng-click="AssignValueAndHide($index)">{{suggestion}}</li>
</ul>
ng-class="{active : selectedIndex === $index}"activewill be set ifselectedIndex === $indexis true. If it doesn't happen in your case, it means thatselectedIndex === $indexisfalse.