Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
263 stars 275 forks source link

[sitecore-jss-angular] Fix Editing Scripts component rendered twice in pages #1948

Closed yavorsk closed 1 month ago

yavorsk commented 1 month ago

Description / Motivation

This PR fixes issue where editing scripts are rendered twice (for server and client) in pages edit mode metadata - by rendering the scripts only on the server.

Testing Details

Types of changes

stasmaxymov commented 1 month ago

@yavorsk Is there a way to run Angular in full SPA mode, without server-side rendering? If yes, the fix might not work with it

yavorsk commented 1 month ago

hey @stasmaxymov , yea I was also thinking about this. In editing mode we always have SSR and since we are rendering these scripts for editing mode only anyway I guess it should be fine