I have json object as:-
{ "callingCodes": [
{
"name": "United States",
"code": "+1",
"isoCode": "US",
"isFree":"true",
"flag":"flag us"
},
{
"name": "Turkey",
"code": "+90",
"isoCode": "TR",
"isFree":"true",
"flag":"flag tr"
}]
I am using country codes sprite image to display country flags. I am using ng-repeat to display the particular flag.
<td><span style="display: inline-block; margin-left: auto;" ng-class="{{'countryData.flag'}}"></span></td>
It is working fine . Now i want to use the same css classes to include the flag in the ng-options (drop-down).
<select id="countryCode" class="form-control" ng-required="true" ng-model='sendMsgData.toCountryCode'
ng-options="supportedCode.code as (supportedCode.code + '(' + supportedCode.isoCode + ')') for supportedCode in supportedCountryCallingCodes">
<option value="">Country Code</option>
</select>
How can i achieve this.