I have created a custom Wordpress plugin that allows users to input Google Map code, such as the following:
<iframe src="https://www.google.com/maps/embed?pb=xxxxx" width="100%" height="100%" frameborder="0" style="border:0"></iframe>
This code is stored in the WordPress database and I am attempting to retrieve it from within my AngularJS code..
getMaps();
function getMaps(){
$http.post("wp-content/themes/koplan/pages/getMaps.php").success(function(mapsdata){
$scope.maps = mapsdata;
});
};
My question is: What is the best way to render/bind the iframe in the front-end using PHP/HTML? I have tried <div ng-bind-html=maps>
but nothing is displaying.
Is there another method I can use? Your assistance would be greatly appreciated. Thank you.