Reputation: 1548
I have globally installed the latest version of Ionic CLI 4 (4.12.0) by running npm install -g [email protected]
, after that, I created a new Ionic project using ionic start
, I opened the project and checked my package.json file :
"dependencies": {
"@angular/common": "~9.1.6",
"@angular/core": "~9.1.6",
"@angular/forms": "~9.1.6",
"@angular/platform-browser": "~9.1.6",
"@angular/platform-browser-dynamic": "~9.1.6",
"@angular/router": "~9.1.6",
"@ionic-native/core": "^5.0.7",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^5.0.0",
"rxjs": "~6.5.1",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
}
And as you can see, Ionic version installed is "5". Any suggestions to create Ionic 4 project instead of Ionic 5 project?
ionic --version
: 4.12.0.
Thank you.
Upvotes: 1
Views: 3766
Reputation: 12139
If you really want to use Ionic 4, you can install a specific version of any package by adding @[version] after the package name, so in your case for @ionic/angular
, you need @ionic/[email protected]
.
In your project root, run:
npm i @ionic/[email protected]
(version 4.11.10 is the LTS)
Upvotes: 3
Reputation: 7396
I'm working with ionic for 2 years and as I know, v5 and v4 have no difference in syntax or compatibility so you can use v5 and not worry about a thing.
Upvotes: 2