Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification for member sequence #55703

Open
andreaslarssen opened this issue May 7, 2024 · 0 comments
Open

Clarification for member sequence #55703

andreaslarssen opened this issue May 7, 2024 · 0 comments
Assignees
Labels
area: adev Angular.dev documentation area: docs Related to the documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@andreaslarssen
Copy link

Describe the problem that you experienced

The Angular style guide states that public properties should come before private properties. But. If I have a private Subject that I want to publically expose, how do I do that without breaking this style guide?

private readonly _subject$ = new Subject();

subject$ = this._subject$.asObservable();

The public property references the private one, meaning that it has to come first. If I'm to use a getter, the observable would be returned as value, not reference. Is there a trick out there I'm not aware of?

Enter the URL of the topic with the problem

https://angular.io/guide/styleguide#member-sequence

Describe what you were looking for in the documentation

No response

Describe the actions that led you to experience the problem

No response

Describe what you want to experience that would fix the problem

No response

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

No response

If the problem is browser-specific, please specify the device, OS, browser, and version

No response

Provide any additional information here in as much as detail as you can

No response

@pkozlowski-opensource pkozlowski-opensource self-assigned this May 15, 2024
@pkozlowski-opensource pkozlowski-opensource added area: adev Angular.dev documentation area: docs Related to the documentation labels May 15, 2024
@ngbot ngbot bot modified the milestone: needsTriage May 15, 2024
@bencodezen bencodezen added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 20, 2024
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: adev Angular.dev documentation area: docs Related to the documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

3 participants