Working with Refs & PortalsEntry 6 of 6

Summary

ConceptReactAngular
Access a DOM elementuseRef() + ref={}viewChild() + #ref
Mutable, non-reactive valueuseRef()Plain class field
Reactive valueuseState()signal()
Pass a ref to a childref prop (React 19) / forwardRef (legacy)viewChild(ChildComponent)
Expose child methodsuseImperativeHandle()Public methods on the class
Render outside the DOM treecreatePortal()CDK Dialog / Overlay + portals

React's refs, imperative handles, and portals give fine-grained, explicit control over the DOM. Angular reaches the same results with template reference variables, signal queries (viewChild()), public component methods, and the CDK's injectable overlay services.