Reputation: 1895
I am trying to start an ionic 2 blank project but it always create an ionic 1 project. That's what I do:
npm install -g ionic@beta
ionic start Test --v2
but when I open the project it's still version 1. I have tried to remove ionic completely with:
sudo npm uninstall -g ionic
sudo npm uninstall -g ionic@beta
sudo npm uninstall -g cordova
but after that when I type "ionic" it's showing that I have ionic v1.7.14. (did it several times and there aren't any errors).
Upvotes: 6
Views: 6866
Reputation: 3859
Best tutorial follow the below link First of install latest Node 6 LTS and NPM 3+ in window machinne.
/>npm install -g ionic@latest
/>ionic start mySampleApp
/>cd ./mySampleApp
/>npm install -g cordova
For android />ionic cordova platform add android
For ios />ionic cordova platform add ios
/>ionic cordova run android
That’s all if any error or problem comes please comment below.
http://infiniteneed.com/setup-and-start-ionic-mobile-app-from-scratch-in-window-machine/
Upvotes: 0
Reputation: 2693
As of now The --v1 and --v2 flags have been removed.
ionic 1 blank project
ionic start myapp blank --type ionic1
ionic 2 blank project
ionic start myApp blank
ionic 3 blank project
ionic start myapp blank --type ionic-angular
Upvotes: 2
Reputation: 976
for a blank project you can give the following command
ionic start ProjectName blank --v2
for tabs template you can give
ionic start ProjectName tabs --v2
--v2 is for ionic 2 project
you can also include --ts for getting the typescript project
ionic start ProjectName blank --v2 --ts
Upvotes: 6
Reputation: 6242
I believe you will also need ionic@beta - currently 2.0.19
npm install -g ionic@beta
The great thing is, you can still use this CLI to install/control/build [email protected] apps - in fact, there's little difference to the user since Ionic v1 is still the default for ionic@beta
.
Upvotes: -2
Reputation: 1895
Actually, I found what was wrong. In the documentation it's written:
ionic start Example --v2
where it should be (at least in my case)
ionic start Example -v2
Upvotes: 0