Sunday, December 8, 2013

[Ionic][Resolved] Launch External URLs with IonicFramework

If you want visit the External URLs by clicking the button in IonicFramework, you can't use href attribute only. You need to use the javascipt onClick Event. For an example, This code not work:

<a href="http://www.google.com"></a>

And you should use this:
onclick="window.open('www.terrapinssky.blogspot.com', '_system', 'location=yes'); return false;"
Sample code for my case :
    <a class="button button-block button-light" href="#" onclick="window.open('www.terrapinssky.blogspot.com', '_system', 'location=yes'); return false;">
    Visit Our HomePage
    </a>
    <a class="button button-block button-light" href="#" onclick="window.open('http://www.terrapinssky.blogspot.com/zh/page/about', '_system', 'location=yes'); return false;">
    About us
    </a>
    <a class="button button-block button-light" href="#" onclick="window.open('www.terrapinssky.blogspot.com/zh/page/privacy_policy', '_system', 'location=yes'); return false;">
    Private Policy
    </a>

No comments :

Post a Comment