Angular app consists of module(s). Every module represents a particular functionality and organizes related components.
Components are the building blocks of an Angular app. Every component defines an angular view. Components use:
- HTML templates to define the view part of the component. These templates contain Angular template syntax to alter the views dynamically according to the app logic, state and data.
- Classes (written in TypeScript) to define components’ logic to handle data and functionality.
- Component-specific styles for the UI design.
Then there are Services, i.e. classes used to define the functionality that is not associated with a view. Services can be injected into components with a mechanism known as dependency injection. Services are shared across components.