How to upgrade angularjs version in ionic v1 app

Looking for a way to upgrade angularjs version in ionic v1 app because of Google Play Console Security alert.
SNYK suggestion: Upgrade angular to version 1.6.9 or higher.

image

Your app contains one or more libraries with known security issues. Please see this Google Help Center article for details.

Vulnerable JavaScript libraries:

Name Version Known issues Identified files

angular.js 1.5.11 SNYK-npm:angular:20171018
SNYK-npm:angular:20180202 assets/www/lib/angular-messages/angular-messages.js
assets/www/lib/angular-messages/angular-messages.min.js

1.5.3 SNYK-npm:angular:20171018
SNYK-npm:angular:20180202 assets/www/lib/angular-animate/angular-animate.min.js
assets/www/lib/angular-animate/angular-animate.js
assets/www/lib/angular-sanitize/angular-sanitize.js
assets/www/lib/angular/angular.min.js
assets/www/lib/angular/angular.js
assets/www/lib/angular-sanitize/angular-sanitize.min.js
Affects APK version xxxxx.

2 Likes

I have this problem too.
My concern is: can Google unpublis our apps because of this issue?

1 Like

Hi, I have same issue. My 8 ionic v1 apps in same status.
I want to upgrade angular version to 1.6.9 or higher. But, I couldn’t find a post about how it’s done

https://angular.io/guide/upgrade

And Google of course

This forum imho does not have many posts related to that. After all, it is Angular, not Ionic

Although along the way you may find usefull tonswitch ui framework version of ionic, leading to the possible conclusion u will want to rebuild

I was able to update the AngularJS library in my Ionic V1 project.

These are the packages I updated and their respective versions:

    "angular": "1.7.8",
    "angular-sanitize": "1.7.8",
    "ionic": "1.2.4",
    "angular-translate": "https://github.com/angular-translate/bower-angular-translate/archive/2.18.1.tar.gz",
    "angular-translate-storage-local": "2.18.1",
    "angular-translate-loader-static-files": "2.18.1",
    "angular-ui-router": "0.4.2",
    "angular-animate": "1.7.8",
    "angular-mocks": "~1.7.8",

Actually, I can’t remember the v1 way of doing this stuff. We do have a bower.json, in which I entered the versions above. After that I ran bower cache clean and let Gulp / Bower install all the things.

PS: I wasn’t able to install angular-translate by it’s version, that’s why I added the link to the gzipped tarball directly.

I tried 1.6.10 with ionic 1.3.3 (latest 1.x) and $ionicLoading started throwing off errors due to issues with $timeout stuff.

I also tried 1.7.9 and had even worse issues.

How have you managed to get ionic to work properly with angularjs versions above 1.5.11?