+ Start a Discussion
mohd areeb 8mohd areeb 8 

Passing List of accounts to a picklist and displaying it in lightning web component

html
<select key={rel.Id} class="form-control" for:each={courseRels.data} for:item="rel">
<option >
{rel.Name}
</option>
</select>

js
@wire(getLocationList) courseRels;

apex controller
@AuraEnabled(cacheable=true)
public static List<Location__c> getLocationList() {
return [SELECT Id, Name FROM Location__c];
}