Skip to content

docs: update Angular integration examples for modern APIs#2781

Open
ArturQuirino wants to merge 1 commit intosuperdoc-dev:mainfrom
ArturQuirino:docs/angular-example-using-modern-angular
Open

docs: update Angular integration examples for modern APIs#2781
ArturQuirino wants to merge 1 commit intosuperdoc-dev:mainfrom
ArturQuirino:docs/angular-example-using-modern-angular

Conversation

@ArturQuirino
Copy link
Copy Markdown

Summary

Updates the Angular integration docs so examples follow current Angular patterns: signal-based viewChild / input() and teardown with inject(DestroyRef) instead of @ViewChild, @Input(), and ngOnDestroy.

What changed

  • Basic setupviewChild.required, AfterViewInit, and inject(DestroyRef).onDestroy() for superdoc.destroy(); SuperDoc is created in ngAfterViewInit so the template ref exists.
  • Full componentinput.required() / input() for inputs; same viewChild + DestroyRef pattern; document and user read via this.document() / this.user().
  • Handle file uploads — Restores full imports at the top of the snippet; same viewChild + DestroyRef cleanup; selector uses this.editorRef().nativeElement.

Why

Keeps the Getting Started Angular page aligned with modern Angular and copy-pasteable for recent projects.

Test plan

  • pnpm run check:imports
  • pnpm run dev:docs — verify Angular Integration page renders and snippets look correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant