I am using a cordova application and have a browser key for map.
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBHJxzPHD_egYnhxntqcvfem35YRjruzAg&callback=initMap">
</script>
but I want to take my key from server , I took and I store this key as
localStorage.getItem("MapCode")
this locastorage gives
"https://maps.googleapis.com/maps/api/js?key=AIzaSyBHJxzPHD_egYnhxntqcvfem35YRjruzAg&callback=initMap"
so I want to write this to src but I couldn't do it.
<script async defer
src=localStorage.getItem("MapCode")>
</script>
How can I solve this?Thanks in advance