Skip to content

@comark/angular: SSR serialization throws NG0503 when projecting content into a custom ProsePre component #507

Description

@mjmustafaev

Facing an SSR/hydration compatibility problem.

Environment: @comark/angular 0.8.1, Angular 22, SSR with hydration enabled.

Rendering a fenced code block through a custom ProsePre component containing <ng-content /> causes Angular’s server-side hydration serialization to fail:

NG0503: Hydration Unsupported Projection of DOM Nodes

The error identifies this location:

<comark-markdown-node>
  <markdown-code>…</markdown-code>
</comark-markdown-node>

Reproduction outline:

  1. Enable Angular SSR and hydration.
  2. Register a custom ProsePre component that projects its children.
  3. Render a fenced code block through Comark.
  4. Open or refresh the page directly so it renders on the server.

Expected: The server renders the code block and Angular hydrates it successfully.

Actual: Server-side hydration serialization throws NG0503.

Activity

  1. added theissue type on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions