Issue
I have simply window.open(), user will search any thing in text field and will click on suggest link, so result will be open in device browser. My code is working fine in system browser(chrome) and in android device but in ios device its not working. Have a look of my code below .
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);
});
}
})
Please help me .
Solution
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
more info: https://wiki.apache.org/cordova/InAppBrowser
Answered By - Sinandro
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.