0

Iam unable to change the font-color of selected option using ng-class and ng-style for static dropdown without ng-repeat.

 <select ng-model="myColor">
    <option value="">none</option>
    <option value="red" ng-style="{'color':myColor}">Red</option>
    <option value="green">Green</option>
</select>

Please refer below JSfiddle link

JS fiddle

Any help would be appreciated.

Thanks.

pbsbr
  • 373
  • 3
  • 12
  • Styling a built in ` – ChrisG Feb 07 '19 at 05:48
  • @ChrisG but I need with angularjs not with css. – pbsbr Feb 07 '19 at 05:55
  • Doesn't matter, angular styles are just CSS expressed as JS object. You cannot magically style the built-in ``, use something like [this](https://valor-software.com/ng2-select/). – ChrisG Feb 07 '19 at 05:58
  • localStorage.getItem('itemVerified') == 'True' – pbsbr Feb 15 '19 at 13:52

0 Answers0