에서 나는 사용자가이 같은 구글 맵 코드 삽입 할 수있는 워드 프레스 플러그인 구축 :표시 Google지도 iframe에서 AngularJS와
<iframe src="https://www.google.com/maps/embed?pb=xxxxx" width="100%" height="100%" frameborder="0" style="border:0"></iframe>
이 코드는 WP-데이터베이스에 저장을하고 난 내부에서 그것을 얻으려고 내 angularjs 코드 ..
getMaps();
function getMaps(){
$http.post("wp-content/themes/koplan/pages/getMaps.php").success(function(mapsdata){
$scope.maps = mapsdata;
});
};
내 질문은 : 어떻게 바인딩 할 수/프런트 엔드 PHP는/HTML에서 렌더링합니까? <div ng-bind-html=maps>
을 시도했지만 아무 것도 나타나지 않았습니다.
다른 방법이 있습니까 ?? 제발 도와주세요, 고마워
로 사용할 수 있습니다 왜 당신은 할 수 없습니다 묶다? 그것은 무엇을 말하는가? – trainoasis
@trainoasis 콘솔에서 경고가 표시되지 않습니다. {{}}로 렌더링하면 데이터 (iframe 태그)가 표시되지만, ng-bind-html로 렌더링하면지도가 여전히 비어 있습니다. iframe 태그를 각도를 사용하여지도보기 –
아마도 당신은 단지 trustashtml을 사용해야합니까? https://docs.angularjs.org/api/ng/service/$sce#methods_trustashtml – trainoasis