Do you know the right way to create your Angular project?
11/05/2017 6:55 AM by
is a great place to get started learning Angular 2, but do not use the tutorials as the template for your real apps!
The Quick Start and Tour of Heros Tutorial will teach you lots about Angular 2 but are not examples of real world projects because:
- They do not include a method to create a production build output
See Do you know the best build tool?
- They do not consider whether your application will require the redux pattern
See Do you know to use ngrx on complex applications?
- They do not include a UI framework
See Do you know the best UI framework for Angular 2?
There are also several well used templates that incorporate Angular and server-side tooling.
While these starters often include advanced functionality, we prefer to implement pure Angular CLI projects where possible because Angular updates frequently.. and when you are using someone else's template that incorporates Angular you are left with the options of waiting for them to update their template to the latest version of Angular, or working out how to do it yourself. This can often leave you with large amounts of work or be being several months behind the latest versions.
To learn how to build real-world Angular 2 applications check out FireBootCamp.
- Figure: Bad Example - Using regular Angular tutorials
- Figure: Good Example: The Angular CLI will create you a new Angular 2 project with a single command, and that project will be all setup with production build, unit testing and end to end testing all configured. If you have very specific build requirements the CLI does not currently support custom webpack builds, though this is coming. See https://rules.ssw.com.au/the-best-build-tool for more info
Do you feel this rule needs an update?