Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

downgrade angular 5 to 4.3.3 in ionic [duplicate]

Tags:

angular

ionic3

I'm using Ionic 3 but I need to know how to downgrade the angular dependencies from 5.0.0 to 4.3.3

"dependencies": {
    "@angular/common": "5.0.0",
    "@angular/compiler": "5.0.0",
    "@angular/compiler-cli": "5.0.0",
    "@angular/core": "5.0.0",
    "@angular/forms": "5.0.0",
    "@angular/http": "5.0.0",
    "@angular/platform-browser": "5.0.0",
    "@angular/platform-browser-dynamic": "5.0.0",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/pro": "1.0.12",
    "@ionic/storage": "2.1.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
like image 977
vince Avatar asked Nov 23 '17 09:11

vince


People also ask

Can I downgrade Angular version?

It is possible to downgrade multiple modules and include them in an AngularJS application. In that case, each downgraded module will be bootstrapped when an associated downgraded component or injectable needs to be instantiated.

How do I change NG version?

ng updatelink To update to the next beta or pre-release version, use the --next=true option. To update from one major version to another, use the format ng update @angular/cli@^<major_version> @angular/core@^<major_version> .


1 Answers

Change the package.json according to the following

 "dependencies": {
            "@angular/common": "4.4.3",
            "@angular/compiler": "4.4.3",
            "@angular/compiler-cli": "4.4.3",
            "@angular/core": "4.4.3",
            "@angular/forms": "4.4.3",
            "@angular/http": "4.4.3",
            "@angular/platform-browser": "4.4.3",
            "@angular/platform-browser-dynamic": "4.4.3",                
            "@ionic-native/splash-screen": "3.12.1",
            "@ionic-native/status-bar": "3.12.1",                
            "@ionic/storage": "2.0.1",
            "ionic-angular": "3.7.0",
            "ionic-plugin-keyboard": "^2.2.1",
            "ionicons": "3.0.0",
            "rxjs": "5.4.3",
            "sw-toolbox": "3.6.0",                
            "zone.js": "0.8.17",
            // ...
        },
        "devDependencies": {
            "@ionic/app-scripts": "3.0.0",
            "typescript": "2.3.4"
        },

And then just (Don't forget to delete the node_module folder from your project directory)

npm install

Done :)

like image 50
Kishan Oza Avatar answered Sep 28 '22 00:09

Kishan Oza