Skip to content

Instantly share code, notes, and snippets.

@Sanix-Darker
Created September 9, 2017 09:10
Show Gist options
  • Save Sanix-Darker/57bc8a58a9b6fb7ed72f30d70451bafc to your computer and use it in GitHub Desktop.
Save Sanix-Darker/57bc8a58a9b6fb7ed72f30d70451bafc to your computer and use it in GitHub Desktop.
External URLs
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>External URLs</title>
</head>
<body>
<ion-view title="Test Page">
<ion-content>
<div class="list">
<div class="item">
To install : cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
<br />
<br />
window.open(‘http://example.com’, ‘_system’); Loads in the system browser <br />
window.open(‘http://example.com’, ‘_blank’); Loads in the InAppBrowser<br />
window.open(‘http://example.com’, ‘_blank’, ‘location=no’); Loads in the InAppBrowser with no location bar<br />
window.open(‘http://example.com’, ‘_self’); Loads in the Cordova web view <br />
</div> <br />
<a class="item" href="#" onclick="window.open('https://www.github.com/sanix-darker', '_system', 'location=yes'); return false;">
Open a Browser
</a><br />
<a class="item" href="#" onclick="window.open('https://www.twitter.com/nraboy', '_system', 'location=yes'); return false;">
Open a Twitter Client
</a><br />
<a class="item" href="#" onclick="window.open('https://plus.google.com/+NicRaboy', '_system', 'location=yes'); return false;">
Open a Google+ Client
</a><br />
<a class="item" href="#" onclick="window.open('https://www.facebook.com/saadjio', '_system', 'location=yes'); return false;">
Open a Facebook Client
</a><br />
</div>
</ion-content>
</ion-view>
<script src="js/index.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment