-
Notifications
You must be signed in to change notification settings - Fork 137
Code Contribution Guideline
jmarkowski edited this page Feb 5, 2020
·
21 revisions
- public:
lowerCamelCase. Example:firstName,addProductToShopCart() - private:
lowerCamelCasewith_prefix. Example:_firstName,_addProductToShopCart()
- Comments should be consistent, for
*.tsfiles, we should add comments, directly above the commented property.
/** Example of 1 line comment */
public firstName: string = '';
/**
* Example of comment with
* text longer than 1 line
*/
public firstName: string = '';- Private variables, methods, or Life cycle Hook Methods Should have comment with
@hiddenannotation
/**
* @hidden
* Example of comment for cycle method, that requires some comment
*/
private _removeList(): void {}
/** @hidden */
private _propertyWithoutComment: string;- All components should have
changeDetectionStrategy.OnPush. It improves the performance of library.