We have been working with Angular for several years at Softcrylic. We recently started working with the latest version and compiled some best practices we are using in-house. We hope these can be helpful to others using the latest version of Angular.
Every production ready code needs bundling. Bundling our code in AngularJS involves using ember, webpack and yeoman. With the latest version, angular shipped its own CLI named Angular CLI. It helps us to create the basic app with basic architecture, setup typescript, enable live reload, build, code analysis, run unit tests, run end to end tests and deploy our code. We need to have nodejs installed to have angular-cli. The installation happens from npm.
Visual studio code has lots of extensions that enable auto complete and code completion. angular2-useful-dev-extensions install a set of plug-ins that help us stay productive with angular. Generating angular snippets are automated using ‘Angular v4 TypeScript Snippets’ plug-in.
Codelyzer helps us suggest the best practices during writing angular code.
There are other best practices suggested by Angular. We do experiment Angular with Typescript and we found Typescript has its own best practices. Some of them collide and create conflicts on what to use. For example, string should use double quotes in Typescript but as per angular, single quotes is acceptable. Deciding what to use and what not to use depends on the type of business and requires experts advice on the same. We at Softcrylic brainstorm whenever we want to set some standards.