Skip to content

Conversation

@samuel-p
Copy link
Contributor

I need support for server side rendering using angular universal. The problem with this is that there is no document on server side, so you have to check if the dom exists before using it:

if (isPlatformBrowser(platformId)) {
    // ...
}

I added that check in your DocumentService to be able to use this lib with angular universal.

@tnicola tnicola merged commit 8bf7391 into tnicola:master Apr 7, 2021
@tnicola
Copy link
Owner

tnicola commented Apr 7, 2021

Thanks for this PR @samuel-p !

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.

2 participants