Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 16 support #984

Closed
davidgronlund opened this issue May 11, 2023 · 9 comments · Fixed by #985
Closed

Angular 16 support #984

davidgronlund opened this issue May 11, 2023 · 9 comments · Fixed by #985

Comments

@davidgronlund
Copy link

ui-router seem to work fine with Angular 16. However, the peer dependency against Angular 15 breaks the npm install process. It can be overridden using --force or --legacy-peer-deps, but that feels too hacky for production. We are in the process of migrating to Angulars built in routing, but are not done yet. Would it be possible to bump the versions?

Thanks!

@davidgronlund
Copy link
Author

For those who might face the same problem. We managed to resolve the depency issue by using npm overrides.

At root level in package.json we added this:

"overrides": {
    "@uirouter/angular": {
      "@angular/common": "^16.0.0",
      "@angular/core": "^16.0.0"
    }
}

@2advancesolutions
Copy link

Do anyone plan on fixing the to make it stable with angular 15 and 16 without doing a hack work around. Reason I ask is because most of the docs are outdated and I don't see a passing build. Is this safe to use for production ?

@wawyed
Copy link
Member

wawyed commented Jun 14, 2023

You shouldn't have any issues running angular 15 ?

@2advancesolutions
Copy link

2advancesolutions commented Jun 18, 2023

@wawyed I ran into issue thanks for response when creating a empty angular 15 project and adding UI router and then trying to do ng serve I got errors trying to build UI project. Can you share a repo with empty angular 15 project with UI route to demo that it's working ? I don't think UI Router is support in 15 and 16 and I look at the old demos using UI router there all in angular 9 and 10 which is outdate now

@2advancesolutions
Copy link

``
UI-Router

@2advancesolutions
Copy link

UIRouterBuild

@wawyed
Copy link
Member

wawyed commented Jun 19, 2023

@wawyed I ran into issue thanks for response when creating a empty angular 15 project and adding UI router and then trying to do ng serve I got errors trying to build UI project. Can you share a repo with empty angular 15 project with UI route to demo that it's working ? I don't think UI Router is support in 15 and 16 and I look at the old demos using UI router there all in angular 9 and 10 which is outdate now

https://github.com/ui-router/sample-app-angular This should be using angular 15

@davidgronlund
Copy link
Author

We have now migrated to @angular/routing. Not gonna lie, it was a hassle in some cases. The main issue, as far as my understanding goes, is that ui-router is not reusing components, while @angular/routing do for performance. This created major issues in instances where reloading and switching routes depended on ngOnInit being called again. There were ways around this, but it was not easy. Custom route resuse strategies where part of the solution but not completely.

@wawyed
Copy link
Member

wawyed commented Jul 12, 2023

Version 12 is out with angular 16 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants