Angular Course — Architecture Overview
Angular has 5 building blocks:
Modules
The Module is a building block that contains routes, components, services, and more.
They can be divided in:
- app module that contains app-specific logic,
- feature modules that contain logic for each individual module
- a shared module that contains logic that can be shared between any of the feature modules.
Components
A typical angular component can contain a template, data, and logic.
It is a forming part of a DOM tree.
Directives
They are being used to attach behavior, extend or transform a particular element and its children. Manipulation of components, elements, is their main preoccupation.
Services
This is what we call a data layer, the logic that is not tied to the component.
Examples of services can be API requests, device-specific APIs, etc.
Routing
It renders a component based on URL state, it is what powers angular navigation.