Angular-google-maps: [Request] Angular Universal/Server Side Rendering Support

Created on 22 Aug 2017  路  7Comments  路  Source: SebastianM/angular-google-maps

In the past month, Angular Universal has become increasingly important because of SEO. I would love to be able to use this package again, but I can't as it stands currently.

Even if you were to make a mock component that could be rendered on the server side and then replaced in the browser, one could import the mock in the server module and the actual module in their browser module. I have been researching Universal very closely for the past week so let me know if you have questions. Again, I think it will be important to this project!

stale

All 7 comments

A possible duplicate of https://github.com/SebastianM/angular-google-maps/issues/1052 (definitelly related, though).

Yeah, they are closely related (I didn't see that one, oops). The repo he forked is quite old though, because the error I am getting is on import, not export. Either way, very closely related.

I've done some more digging, and I am 99% sure that if this module was compiled to es5 it would work for universal.

@dockleryxk oddly enough I didn't realize this was an issue but made a PR for it already in #1114

And yes this is related to #1052 from my experience.

Until this is resolved, I have it working with a workaround by dynamically loading a component that contains my agm-map based on if it's the browser or server: https://angular.io/guide/dynamic-component-loader

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

R.I.P.

Was this page helpful?
0 / 5 - 0 ratings