Closed renestalder closed 6 years ago
Oh well, I just saw this:
if (!this._isBrowser) { return; }
So I reformulate my issue.
I might be able making a pull request for this. I have to dig a bit deeper in your code, but normally it shouldn't be a problem adding the svg element to DOM server-side.
A PR would be appreciated! I don't have much experience with SSR.
I think this will be solved with Renderer3 when that rolls around.
I'll anyway have to check on this until the middle of the month since the web app I maintain will go full server-side. So I'm going to check and might push that long promised adaption for server-side. (Since conditions in your code will have to be adapted with or without renderer3)
I started with this, but stuck at the point where the svg file is retrieved on server-side. On client-side with the absolute URL this is a no-brainer. On server side, I first tried by setting baseURL manually, then by using relative urls instead of absolute urls. The http get call never comes back.
I have to research more in depth how to retrieve files on server-side. Possibly also only a configuration problem.
So, I have the PR ready and I tested it server-side and client-side in a big, productive project. But still, you might to want to test the client-side functions again. I'm not sure we use all the features in our application.
Published in v6.1.0. Thanks @renestalder !
Hi ! Just followed all the steps on the README.md and still can‘t figure how to make it work.
In my case, no svg are output when using universal.
Thanks !
Does anyone know how to solve this issue? Its being a while and I'm still not able to make it work with server-side rendering :(
I noticed, that when rendering an Angular page server-side, the svgs will not show up.
Is there a trick for getting that working or is it just not supported (yet)?