Closed mustafa-acar closed 2 years ago
I'm awaiting an outcome on this, I have read elsewhere that Ionic are aware of the issue which is some breaking change to do with the Angular routing causing Ionic to fail. It would be good to have an update on this to see where to take developments at this stage.
Angular versioning vs its ecosystems is what bothers me the most! When Ionic Team releases a new version of the Framework, it's immediately made obsolete by the Angular's new version.
👋 Hey everyone! Ionic v5 apps DO support Angular 9. You can update your apps without issue as seen here
https://www.youtube.com/watch?v=851HkqX3YQ4&
We currently default to Angular 9 at the moment for a few reasons:
V9 enables Ivy by default, which could affect other libraries or packages in a project. Instead of providing the latest which the ecosystem is still updating to, we provide at least something we know for a fact will workout issue.
V5 of ionic was released a week about ng9, which is a pretty tight window. While we knew v5 worked fine with ng9, there were other things that required attention. Plus, the migration process isn't difficult.
@gilbertoalbino it's important to know that Angular v8 is not obsolete... it is in fact in LTS mode per angular's release schedule.
Just in case someone needs the steps and for completeness on what @mhartington said above. I done the following to update the a default blank project: ionic start myApp blank --capacitor --type=angular
1) ionic start myApp blank --capacitor --type=angular
2) cd myApp
3) ng update @angular/core @angular/cli
4) Using ncu -i
I updated everything except: [core-js, tslint, typescript]
5) I removed core-js
from package.json
completely
6) npm prune
P.S. I would really like to see how TSLint
can also be replaced with ESLint
.
@mhartington
We currently default to Angular 9 at the moment for a few reasons
Do you mean that you currently default to Angular 8 instead?
@mhartington
We currently default to Angular 9 at the moment for a few reasons
Do you mean that you currently default to Angular 8 instead?
Yes. Ionic is still targeting Angular 8.
@mhartington
We currently default to Angular 9 at the moment for a few reasons
Do you mean that you currently default to Angular 8 instead?
Yes. Ionic is still targeting Angular 8.
I understand that, I was just saying it is a typo above.
@mhartington
We currently default to Angular 9 at the moment for a few reasons
Do you mean that you currently default to Angular 8 instead?
Yes. Ionic is still targeting Angular 8.
Confirm.
my angular version : Angular CLI: 9.1.0 Node: 12.14.1 OS: win32 x64
ionic cli version : CLI 6.3.0
with a new starting blank template, project has target angular8.
"@angular/common": "~8.2.14", "@angular/core": "~8.2.14", "@ionic-native/core": "^5.0.0",
We currently default to Angular 9 at the moment for a few reasons: it is in fact in LTS mode per angular's release schedule.
Hi. So Ionic 5 defaults to Angular 8, not 9, right? If so, I think it would be best to edit that message (the one I'm quoting here) to avoid confusion :).
You can update your apps without issue as seen here https://www.youtube.com/watch?v=851HkqX3YQ4&
Also, link to the specific time in the video, for those who might want to go directly to the part about upgrading to Angular 9: https://youtu.be/851HkqX3YQ4?t=243
Is it the version of the CLI that decides which version of angular a project will be created with? I'm on CLI 6.18.1 and when I create a blank project, it defaults to Angular 5.
@bradeaton - no. It is the starter: https://github.com/ionic-team/starters
ionic start <project-name> <template> --type=angular|react|vue
(at least for modern versions of Ionic).
So, if you do ionic start foo-bar blank --type=angular
it will use NG 12 as specified in the base package here: https://github.com/ionic-team/starters/blob/main/angular/base/package.json, and then add merge that with the "blank" bits here: https://github.com/ionic-team/starters/tree/main/angular/official/blank
You are (apparently) specifying Ionic v3 (ionic-angular) which will get you an old and unsupported version of Ionic whose last officially supported version of Angular was NG 5. You shouldn't really want that, but if you do we still allow it and it will use the files under here: https://github.com/ionic-team/starters/tree/main/ionic-angular
Heck you could even do Ionic v1 if you wanted: https://github.com/ionic-team/starters/tree/main/ionic1
But it is all from the starters.
It is good to keep your CLI up to date, as then you get the latest features of the CLI, but the starting point of any generated project is determined by the starter that you use.
Hopefully that all made sense.
Description: I have just upgraded Node JS, npm, angular-cli and ionic cli to the latest and stable versions and created a new project with
ionic start new-project blank
command.. I expected to see Angular 9 dependencies in package.json file but all Angular dependencies are for 8.2.14 version.I tried to run
npm i @ionic/angular@latest --save
command on an existing project and it installed 8.2.14 version again.As I know the IVY renderer came with Angular 9. Angular 9 has other features like "entryComponents" etc.
My questions are: Does Ionic 5 with Angular 8 dependencies have these features? Should I continue developing or wait.
My
ionic info
:Other Information: