Astro AnalogJs Input Params are undefined in ngOnInit on SSR #1996
LuepoldMartin
started this conversation in
General
Replies: 1 comment
|
Using an input setter might work. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Please provide the environment you discovered this bug in.
https://stackblitz.com/edit/github-qfeekc5j-ygz1jywz?file=src%2Fpages%2Findex.astro
Which area/package is the issue in?
astro-angular
Description
I need to load data by an Input param coming from astro. Normally in Angular, input params are available in OnInit as onChanged is run before onInit. But when running astro and Analogjs, input params are only resolved after ngOnInit (in ngOnChanges) on server side. Client side is correct.
See reproduction on Stackblitz and see log: https://stackblitz.com/edit/github-qfeekc5j-ygz1jywz?file=src%2Fpages%2Findex.astro
Please provide the exception or error you saw
param Input is undefined in ngOnInit
Other information
I would be willing to submit a PR to fix this issue
All reactions