ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Ionic v1 is not compatible with angular 1.7.0 #386

Open stripathix opened 6 years ago

stripathix commented 6 years ago

When will ionic v1 be upgraded to support angular 1.7.x ?

There are few breaking changes if upgrade angular to 1.7.0.

https://github.com/angular/angular.js/blob/master/CHANGELOG.md

One issue that I am getting is due to this breaking change on $ionicLoading

$timeout: throw when trying to cancel non-$timeout promise

nayfin commented 5 years ago

We are getting the same error when trying to use Angular 1.7 with Ionic 1. Docs describe problem here, but it looks like we will have to submit a PR to Ionic to change $ionic.loading.show, hide, cancel etc... I wish they would have maintained it up to Angular 1.7....

Another library is affected by this as well

stripathix commented 5 years ago

@nayfin I migrated to Ionic4 + Vue. I can say it was a good decision.

nayfin commented 5 years ago

This is for an enterprise app, so that's not really an option. Thanks though.

davidecampello commented 5 years ago

Hi @nayfin, have you found a solution for this problem? Thanks

nayfin commented 5 years ago

@camdav We got pulled into something else, but we started a POC where we upgraded to AngularJS 1.7 pulled out all $ionicLoading calls, then replaced it with a web component of the angular material loading component that we built with angular elements. We needed to use web components anyway, it was the main reason we had to upgrade angular to 1.7, so this path wasn't terrible for us. If you don't feel like using web components, you could just replace the $ionicLoading with a loading component from the old angular material library or something similar.

davidecampello commented 5 years ago

Thank you for the answer!

marcochavezf commented 5 years ago

I fixed this changing var loadingShowDelay = $q.when(); to var loadingShowDelay = $timeout(noop); in https://github.com/ionic-team/ionic-v1/blob/master/release/js/ionic-angular.js#L2267

FitFingers commented 2 years ago

I fixed this changing var loadingShowDelay = $q.when(); to var loadingShowDelay = $timeout(noop); in https://github.com/ionic-team/ionic-v1/blob/master/release/js/ionic-angular.js#L2267

This solved the issue for me. Thanks!