Skip to content

Conversation

lindolo25
Copy link
Contributor

Hi, This is a work in progress that I will like to present to you. It covers 3 significant changes, most of them related to the lazy-load functionality.

  1. Updating loadNgModule and the related functionality to stop using @deprecated Angular APIs.
  2. Creation of a new property, loadComponent, and related functionality to lazy-load standalone components.
  3. Updating ui-view component to replace @deprecated Angular APIs. The APIs changes are significant as this update will make components rendered using ui-view work well with the newer input Signals.

Please let me know any feedback regarding this changes,

Thanks you all.

@lindolo25 lindolo25 force-pushed the chore/load-component branch from 7164daa to 3aac13e Compare January 21, 2025 01:36
@lindolo25 lindolo25 marked this pull request as ready for review January 21, 2025 01:50
@lindolo25
Copy link
Contributor Author

Hi @wawyed, this PR is ready for review!

@hheexx
Copy link

hheexx commented Jan 22, 2025

I can test if you releease as beta to npm

@jpike88
Copy link
Contributor

jpike88 commented Feb 5, 2025

amazing, nice work

@ANUDARSHI
Copy link

Has the PR for supporting lazy-loading of standalone components been merged yet? I'm on the latest version of UI-Router, but I don't see any functionality called loadComponent. When I try to use it, I get an error.

X [ERROR] TS2552: Cannot find name 'loadComponent'. Did you mean 'BlogComponent'? [plugin angular-compiler]

src/app/blog/blog.state.ts:100:14: 100 │ lazyLoad: loadComponent(() => import('./about/about.component... ╵ 
@wawyed
Copy link
Member

wawyed commented Feb 9, 2025

If the MR is open it means it hasn't been merged 😅

@jpike88
Copy link
Contributor

jpike88 commented Feb 9, 2025

This would be great to get going, hopefully can start to unlock faster initial load speeds for standalone projects

@lindolo25
Copy link
Contributor Author

Hi @wawyed, I hope you're doing well. I wanted to follow up on this changes, I understand your time for this project is limited, but wanted to check if there's any update. Thanks for your time!

@wawyed wawyed merged commit e381ea4 into ui-router:master Mar 14, 2025
4 checks passed
@Sabbacus
Copy link

Will this be a 16.1/17.0 release released at this time or will this code be released together with support for Angular 20 in June/July?

@lindolo25
Copy link
Contributor Author

Hi @wawyed , thanks for the help with this PR. Was this change released to npm, the lastest version remains 16.0.0.

@wawyed
Copy link
Member

wawyed commented Apr 3, 2025

Just released it @lindolo25 @Sabbacus as 16.1

@hheexx
Copy link

hheexx commented Apr 3, 2025

I have updated our app today and no problems reported for now.
Will try standalone tomorrow.

@hheexx
Copy link

hheexx commented Apr 3, 2025

I tried standalone in dev now.
Look like it works and it also fixes bug I had with opening in new tab.
Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants