我的控制器功能是: -
vm.selectSales = function () {
var url = "";
if ($scope.selection.length > 0) {
for (var i = 0, len = $scope.selection.length; i < len; i++) {
url=($state.href('work-area', { 'saleId': $scope.selection[i] ;
window.open(data, '_blank');
$window.location.reload();
}}};
根据这个,我想打开多个标签,但只打开一个标签。请建议我打开具有不同销售ID的多个标签的方法。
答案 0 :(得分:1)
经过大量搜索后,我发现代码很好,即代码完美无缺: -
vm.selectSales = function () {
var url = "";
if ($scope.selection.length > 0) {
for (var i = 0, len = $scope.selection.length; i < len; i++) {
url = ($state.href('work-area', { 'saleId': $scope.selection[i] }));
window.open(url, '_blank');
}}
};
但由于Chrome弹出窗口无法正常工作,因此无法正常工作。
现在,要使用此代码,我需要更改我的chrome设置: - 点击设置-----&gt;高级设置-----&gt;内容设置-----&gt;允许所有网站显示弹出窗口。
感谢所有人。