Showing posts with label Ionic. Show all posts
Showing posts with label Ionic. Show all posts

Sunday, June 29, 2014

[Ionic][Resolved][Windows] Error : Failed to run "ant -version", make sure you have ant installed and added to your path

While I follow the getting start tutorial in official site and try running the build the ionic android app command: "ionic build ios". To solve this problem , you need download and install the Apache ANT project and config the related environment values.

Step1)
Download the Apache AND project from this link:
http://ant.apache.org/bindownload.cgi
For me, I download the source from this link:
http://apache.01link.hk//ant/binaries/apache-ant-1.9.4-bin.zip

Step2)
Move the zip-file you downloaded to somewhere which you wanted to be the installation directory.

Step3)
Unzip the files you moved

Step4)
Edit 2 enirnomanet values:
For my case, my ant was unziped to this path, so this is the home of my ant:
C:\wamp\apps\apache-ant-1.9.4

Add a value named "ANT_HOME" in you system valuable.
C:\wamp\apps\apache-ant-1.9.4

And then edit the value named "Path" at your system valuable, Add that at the end of the value existed.
%ANT_HOME%\bin

Step5)
After finish the setting, Save and restart your command prompt

Build the app again:




Related site:
http://ant.apache.org/bindownload.cgi

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>