Angular — Using service as a single source of truth for highly coupled page components

Liu Ting Chun
5 min readJan 20, 2021

Pages refer to the outermost components that combine multiple smaller components to form the views for users. They are usually the least generic component among the whole code base. In order to suit the very specific UI/UX requirements, it is very common for pages to have clumsy logic across multiple smaller page components, which create strong coupling. These codes are difficult to maintain and develop as states and logic are all interdependent. Here I would like to introduce how we can use a service to…

--

--

Liu Ting Chun

Web developer from Hong Kong. Most interested in Angular and Vue. Currently working on a Nuxt.js + NestJS project.