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

标签 javascript angularjs crystal-reports

我需要将数据或对象(条件)从 AngularJS 传递到 asp.net Web 中的 Crystal Report Viewer

AngularJS 代码:

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

谢谢。

最佳答案

使用查询字符串:

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

关于javascript - 如何通过 window.open 传递数据或对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41867074/

相关文章:

crystal-reports - 如何在 Crystal Reports 中将 '07/03/2018' 格式化为 'March 7th 2018'

JavaScript RegExp - 查找特定字符之前的所有前缀

javascript - HEAD 中 LINK 和 STYLE 元素的评估顺序

html - AngularJS 正确语法用于另一个大括号内的大括号中的变量

c# - 以编程方式传递参数并在 Crystal 报表中显示

crystal-reports - 如何在 Crystal Reports 2008 中正确对齐数字字段?

javascript - 谷歌地图标记事件 'dragend' 问题

javascript - div 的构造函数返回未定义的元素

javascript - 任何用于实现像 Google Stories 这样的可滚动照片墙的库?

html - Angular : how to nest templates inside <pre> tags?