Reputation: 1460
Is it possible to prevent elements from being rendered on the server when using angular universal? Specifically, I want to prevent ads from being rendered on the server as they are slowing down page load speed.
Upvotes: 2
Views: 276
Reputation: 3661
You can use ngIf
and test isPlatformBrowser
with injected PLATFORM_ID
.
Upvotes: 2