简体   繁体   English

如何通过window.open传递数据或对象

[英]How to pass data or object by window.open

I need pass data or object (Criteria) from AngularJS to Crystal Report Viewer in asp.net Web 我需要将数据或对象(条件)从AngularJS传递到asp.net Web中的Crystal Report Viewer。

AngularJS Code: AngularJS代码:

$scope.OnPrint = function() {
 $window.open('http://localhost:89/', '_blank');
};

Thank. 谢谢。

You can use query string: 您可以使用查询字符串:

$scope.OnPrint = function() {
 $window.open('http://localhost:89/?param1=value&param2=value', '_blank');
};

Use the query string: 使用查询字符串:

$scope.OnPrint = function() {
 var param1 = '192';
 var param2 = 'userReport';
 $window.open('http://localhost:89/?param1=' + param1 + '&param2=' + param2, '_blank');
};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM