Abh*_*rma 5 javascript angularjs ionic-framework
我只有window.open(),用户将在文本字段中搜索任何内容,然后单击“建议”链接,因此结果将在设备浏览器中打开。我的代码在系统浏览器(chrome)和android设备中工作正常,但在ios设备中不工作。在下面看看我的代码。
angular.forEach($scope.data, function(value, key) {
var pageListElement = "";
if(value.Name != undefined) {
angular.forEach(value.Topics, function(value, key) {
pageListElement = '<ion-item class="item-avatar-left energized item item-complex ionItemDisp" '+
'id="page-list-item1" href="#" onclick="window.open(\'' + value.FirstURL + '\''+
', \'_system\', \'location=yes\'); return false;"><a class="item-content" ng-href="#" href="#">'+
'<img src="' + value.Icon.URL + '"><h2energized>' + value.Text + '</h2energized>'+
'</a></ion-item>';
});
} else if(value.FirstURL != undefined) {
pageListElement = '<ion-item class="item-avatar-left energized item item-complex ionItemDisp" '+
'id="page-list-item1" href="#" onclick="window.open(\'' + value.FirstURL + '\''+
', \'_system\', \'location=yes\'); return false;"><a class="item-content" ng-href="#" href="#">'+
'<img src="' + value.Icon.URL + '"><h2energized>' + value.Text + '</h2energized>'+
'</a></ion-item>';
} else {
alert("unhandled query");
}
searchPageList.append(pageListElement);
});
}).
error(function(data, status,headers, config) {
alert("Status is " + status);
});
}
})Run Code Online (Sandbox Code Playgroud)
请帮我 。
window.open('url', '_system');
//Loads in the system browser
window.open('url', '_blank');
//Loads in the InAppBrowser
window.open('url', '_blank', 'location=no');
//Loads in the InAppBrowser with no location bar
window.open('url', '_self');
//Loads in the Cordova web view
Run Code Online (Sandbox Code Playgroud)
更多信息:https : //wiki.apache.org/cordova/InAppBrowser
| 归档时间: |
|
| 查看次数: |
9117 次 |
| 最近记录: |