Applying Code Conventions and Design Patterns in Angular
In this chapter, we will explore code conventions, best practices, and design patterns commonly used within Angular applications. You will also create a generic HTTP service and mock API responses using an HTTP interceptor.
Following good code conventions allows you to write code consistently. Whether you write your code solo or in a team, conventions ensure that you use similar syntax for common occurrences and follow best practices. Using good design patterns helps you to write code implementations that scale well and are battle-tested.
Code conventions and best practices focus more on processes and style-related aspects such as using the CLI, naming, using types, or preventing nested observables. Design patterns, on the other hand, focus on how you set up, handle, and implement common occurrences, problems, and flows within your code base.
By the end of this chapter, you will know all about code conventions, best...