If you search for ‘Angular architecture’, you will find many articles on the architecture of the Angular framework itself. However, if you search for articles on the architecture of the app you are writing using Angular, you will find much less information. Many of these articles describe an app architecture and how to write code in line with that architecture. They are all great articles, yet they leave me with the question “how do you create that sort of architecture?”. Or “what function/action/code do I need to put into which component/service/directive/pipe?”
I would like to show you some of my personal approaches. My colleague Martijn Kloosterman wrote “How to talk to your children and listen to what they have to say” part 1 and part 2 where he explains parent-child communication between components. This article is actually the next step, because some basic Angular knowledge is required. If you are not sure, take a look at Martijn’s blog posts first.
We are lucky enough to be able to start building the LinkedIn Angular app from scratch, so let’s use the convenience of Angular’s command line interface (CLI) and start with