각도 -ui 눈금에서 행을 선택하고 행을 클립 보드에 복사하고 싶습니다. 난 그냥 눈에 보이는 열을 복사하려면, http://plnkr.co/edit/dcj7DUWHyA3u1bouxRhI?p=preview각도 ui-grid에서 행을 선택할 때 보이는 열만 가져옵니다.
그러나,하지만 난 JSON에있는 모든 열을 얻고있다 :
$scope.copySelection = function() {
$scope.retainSelection = $scope.gridApi.selection.getSelectedRows();
alert(JSON.stringify($scope.retainSelection));
var input = document.createElement("input");
input.type = "text";
document.getElementsByTagName('body')[0].appendChild(input);
input.value = JSON.stringify($scope.retainSelection);
input.select();
document.execCommand("copy");
input.hidden = true;
$scope.gridApi.selection.clearSelectedRows();
};
Plunker :
이 내 코드입니다. 나는 숨겨진 칼럼을 원하지 않는다. 어떻게해야합니까? 도와주세요.
바이올린을 추가 할 수 있습니까? –
@MuhammedNeswine 내 질문을 편집했습니다 –