You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Please excuse any incorrect terminology in the title or this description).
I had a back and forth with @DanielSchaffer on property and function organization on a class. I've noticed occasional inconsistencies in where we place our functions in files (For example, declaring a private function before a public one for no reason). Daniel proposed the following:
public static properties
public static methods
private static properties
private static methods
public property accessors (grouped with their private local fields, if applicable)
private property accessors
public fields
private fields
constructor
lifecycle hooks, in lifecycle order (e.g. ngOnInit before ngOnDestroy)
public methods
protected methods
private methods
I think this should be clearly publicized in the style guide. Ensuring our functions are in the correct makes it significantly easier to navigate a file
The text was updated successfully, but these errors were encountered:
(Please excuse any incorrect terminology in the title or this description).
I had a back and forth with @DanielSchaffer on property and function organization on a class. I've noticed occasional inconsistencies in where we place our functions in files (For example, declaring a private function before a public one for no reason). Daniel proposed the following:
I think this should be clearly publicized in the style guide. Ensuring our functions are in the correct makes it significantly easier to navigate a file
The text was updated successfully, but these errors were encountered: