Closed advdv closed 8 months ago
Hey! Sorry for not replying earlier, this got lost in a bunch of other work.
It's interesting that this broke, apparently, because we're using it in the Demo app, and it definitely used to work when I last built that based on the Angular v17 prerelease:
It's also interesting you mention that the provider
key should be used - we ran this plugin past the Angular team before releasing, and they didn't mention anything regarding that. So definitely a peculiar issue! I'll dig into what's happening.
I've redeployed the demo site for testing purposes, and i'm seeing the log line that is populated by @Inject('netlify.request')
and @Inject('netlify.context')
work correctly:
Are you observing this in production or in local development? If you could provide a reproduction repository + some detailed steps on how to reproduce, that would be super helpful in finding the root cause.
I'll go ahead and close this issue, since I wasn't able to reproduce it. If anybody else encounters this and has a reproduction case, please comment and i'll reopen!
@Skn0tt, demo app is using angular17-next.0, did you tried with stable releeased version or even the 18 version? I can't get it work on dev, always getting undefined
.
Describe the bug The section of the README.md that is titled "Accessing Request and Context during Server-Side Rendering" doesn't work.
To Reproduce Default angular project following the blog post: https://www.netlify.com/blog/deploy-your-angular-v17-apps-to-netlify/
If anyone is still maintaining this repository I can provide a more elaborate project to reproduce
Expected behavior It should allow me to log the geo.city and request url. Instead the @Inject doesn't provide any value. I suspect this is because the code here: https://github.com/netlify/angular-runtime/blob/main/src/helpers/setUpEdgeFunction.js#L109 calls the render function with "platformProvider:" but I think it should be "provider:".
Versions
If you're using the CLI to build
If you're using file-based installation