The purpose of this repository is to provide a set of standards and best practices for developing angular applications that should be followed to write quality and safe code.
It is still under progess so things will keep on adding.
We have doc
folder that contain collection of concepts and questions & answers that can help you to prepare for interview, exam or expanding knowledge. You can add it to watch list and give it a star if it helps. Contents are refrenced from multiple sources (primarily Angular Documentation).
*Note: There are known duplicates in docs/security
that needs to be sanitized. It will be cleaned soon.
This project was generated with Angular CLI version 16.1.2.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
Provided resource have some inappropriate rule sets and must be modified.
- Default log for failure of Angular packages, we should not remove this.
/home/macaw/mwd/Angular/angular-standards/src/main.ts
7:17 warning Unexpected console statement no-console
- Trailing comma should not be recomended, in strict lintings/ json. Trailing comman throws an error as it is not required but still there.
/home/macaw/mwd/Angular/angular-standards/src/app/app-routing.module.ts
8:28 error Missing trailing comma comma-dangle
9:4 error Missing trailing comma comma-dangle
14:26 error Missing trailing comma comma-dangle
- In case of dynamic string value allication angular generated files use
``
.
/home/macaw/mwd/Angular/angular-standards/src/app/app.component.spec.ts
19:6 error Strings must use singlequote quotes
- This error is raising error on base architecture template of angular.
/home/macaw/mwd/Angular/angular-standards/src/app/app.module.ts
14:1 error Prefer default export on a file with single export import/prefer-default-export
- https://github.com/OsmosysSoftware/dev-standards/blob/main/coding-standards/angular.md
- https://angular.io/guide/styleguide
- https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base
- https://osmosysasia-my.sharepoint.com/:x:/g/personal/rajkumar_p_osmosys_co/EcSnDteKjvhGr-6jgmdIRDEBVsW7hjqfXs7o8NwUTea7oQ?e=QQAVfR
- https://eslint.org/docs/latest/rules/spaced-comment#rule-details
- https://angular.io/guide/security