我不想在地址栏中显示参数,也不想将其存储在本地。 例如参数值,例如vndfj / dfgdgdfg12 / dg ==。
我尝试了以下代码,但在IE和Edge上不起作用
let data = {
__tkn: "sjkss/sdfsdf/fdffs23=="
}
let wObj = window.open('./Test');
wObj .json_data = data;
答案 0 :(得分:0)
您可以使用window.open属性轻松地做到这一点,
例如
printDocument() {
//generate render link
let printURL = this.apiBaseUrl + "WestCore/GuaranteeLetter/" + this.selectedDocumentId + "/RenderGuaranteeLetter?reportPath=" + encodeURIComponent(this.selectedTemplate);
window.open(printURL);
}
或者这就是我使用window.open ...在项目中渲染Blob图像的方式...
createImageFromBlob(image: Blob) {
if (window.navigator.msSaveOrOpenBlob) // FOR IE10+
window.navigator.msSaveOrOpenBlob(image, "download." + (image.type.substr(image.type.lastIndexOf('/') + 1)));
else {
var url = window.URL.createObjectURL(image);
window.open(url);
}
}