"Uncaught Loaded unexpected element while trying to get rendering HTML from server. Expecting last tag to be closing script marker" in Sitecore Angular JSS version 10.1
I have got this error in Sitecore Angular JSS version 10.1 when the component gets added in Experience editor mode.
Following are the reasons for the error to occur:
Without null check for rendering property value and when it's getting to bind empty property.
When the rendering(HTML) is having a comment section with a conditional statement sometimes breaks in HTML.
<!--<ng-template #elseStatement> Unused Logic </ng-template> -->
- Always add null check even if the field is required in Sitecore.
- Remove unwanted commented lines from HTML.