Angular is used to create single-page web applications. It consists of:-
- Modules
- Components
- Templates
- Directives
- Services
- Dependency Injection
- Its main building blocks are components and templates which make up views. So instead of navigating through pages, angular router service navigate through views.
- Components and Templates are binded together by two types of data bindings:- Property Binding and Event Binding. Property binding ([] or {{}}) takes the value from component to DOM (Document Object Model) and Event Binding (()) takes the value from DOM to the component. Bindings can also be defined between parent and child components.
- Services can traverse through different components. So one service can be used by more than one component. Example - Router Service is used across different components to navigate different views.
- Services are injected into the component through dependency injection.
- Angular Modules register all modules, components and providers which are needed by angular app.
- Directives change the component templates depending on the logic and data. There are two types of directives:- Structural Directives (*ngfor and *ngIf) and Attribute Directives.
- Follow Me On Instagram at Pranav Arora
- Lets Get Connected on Linkedin at Pranav Arora