1
JSON 응답을 요구하는 서비스가 있습니다.이 JSON 응답을 새 창에서 텍스트 영역에 복사하고 싶습니다. AngularJS에서이 작업을 수행 할 수있는 방법이 있습니까? 내가 지금까지 무엇을 가지고AngularJS - JSON 텍스트를 새 창에서 textarea로 복사
: 나는 각도가 아주 쉽게 할 수 있다는 것을 발견
GetData.getJson(item).then(function(returnValues){
var data = returnValues[0].data; // a json object as a string, ideally I would like to pretty print this in the new window.
// need to create text area in the new window so I can paste the text in
$window.open("data:text/html,"+ encodeURIComponent(data), "_blank", "width=800,height=600");
}