google / google/styleguide

Protected template properties seems not to be the norme in angular.

Open
#924 1 comment 0 reactions 0 assignees View on GitHub
lang:ts
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

Hello,

I was reviewing the TypeScript style guide and noticed that it recommends using `protected` for template properties:
https://google.github.io/styleguide/tsguide.html#properties-used-outside-of-class-lexical-scope

However, in practice, I rarely see this used in the documentations. Not in the Angular documentation, nor in Angular Material documentation.

Given that this rule doesn't seem to be followed in most real-world Angular codebases, would it make sense to consider removing this recommendation or just say "prefer `public`" instead? That would likely be the least disruptive change with minimal impact on existing projects.

Thank you for your feedback!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.