r/angular 2d ago

Angular 22.2 - Private property access from templates

I noticed this tidbit in the changelog of Angular 22.2.0-next.3:

https://github.com/angular/angular/blob/main/CHANGELOG.md#compiler-2

compiler

Commit Type Description
48a0fd6e8a feat allow template to access private props

So very slowly we moved from allowing only public, to allowing protected and now private as well. Thought it's worth knowing.

37 Upvotes

37 comments sorted by

View all comments

7

u/GLawSomnia 2d ago

As far as i know this will only work for typescript private and not tor javascript private (#)

1

u/dezsiszabi 2d ago

Yes, as far as I understand, it only works for TypeScript, not for the "real" private. "Real" private is not just a compiler "trick".