Skip to content

Conversation

@trik
Copy link

@trik trik commented Dec 21, 2025

This PR contains:

  • IMPROVED TESTS

Describe the problem you have without this PR

Restore server-side-rendering in angular examples and re-enable ssr tests. It was removed when the angular example has been updated to angular 17

@trik
Copy link
Author

trik commented Dec 23, 2025

@pubkey have you had the chance to look at my pr? i can see that CI is failing cause the ts-node package is missing

don't know if it can be useful, but i could work also on an update of the angular app. currently it's using v17 which is quite old and it does not use any of the features introduced by the new versions (standalone components, signals)

@pubkey
Copy link
Owner

pubkey commented Jan 5, 2026

@trik Yes if you find the time, please update the angular version.
If the ts-node package is missing, just add it to the deps in the angular example.

@trik
Copy link
Author

trik commented Jan 9, 2026

@pubkey the angular app updated to v21 is ready

we have only two relevant changes:

  1. this assertion has been removed


    the angular rendered has changed a lot in the latest versions, and it's not true anymore that the observables are run inside ngzone. if you try adding a console log inside the tap operator function and commenting the list template you could see that the observables is not running. if you want to add a similar test we should find another way

  2. in the previous version of the application, the angular injector was passed as a parameter to the initDatabase function, i had to remove it because it was throwing "Injector has already been destroyed" exception on SSR

    useFactory: (injector: Injector) => () => initDatabase(injector),

    the injector parameter is optional for the toSignal method, what was the purpose of manually passing as a parameter?

@pubkey
Copy link
Owner

pubkey commented Jan 9, 2026

what was the purpose of manually passing as a parameter

If I remember correctly, this was to make the RxDatabase starting up even before angular itself is loading, to this improves the time to interaction because when angular starts the database is already there.

@trik
Copy link
Author

trik commented Jan 9, 2026

what was the purpose of manually passing as a parameter

If I remember correctly, this was to make the RxDatabase starting up even before angular itself is loading, to this improves the time to interaction because when angular starts the database is already there.

yeah, i get it, the app initializer is still there, i only removed the manual Injector injection

i see that ci is failing, sorry i was focused on ssr and i did not run the other tests, the hero list component template has changed a little bit, that's why they are failing i guess

Updates the Angular example application to version 21 and configures it for server-side rendering (SSR).

This involves migrating from modules to standalone components, updating the build process to use the 'application' builder, and configuring SSR-specific build configurations.
@trik
Copy link
Author

trik commented Jan 9, 2026

@pubkey the test execution should be good now, i tested also the other steps of the CI flow

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 this pull request may close these issues.

3 participants