1. Introduction to Angular's MVC and Data Binding - ShakthiSampath/Learning-Angular.io GitHub Wiki
- What is Model - View - Controller
- MVC - An Architectural Pattern
- Model:
- Main Component - application behaviour
- Manages data,logic and rules
- View:
- User Interface
- Controller:
- Accepts Input and converts it to command for Model and View - Interpreter
-
What is Data Binding
- Automatic Synchronization of model and view components
- Angular's implementation shows it as a single source
- Whenever model changes view changes and Vice Versa
-
Types of Data Binding
-
One Way Binding
- How is it done?
- Disadvantage
-
Two Way Binding - Angular's way
- How is it done?
- Advantages
-
One Way Binding
<li>{{hero.name}}</li>
<hero-detail [hero]="selectedHero"></hero-detail>
<li (click)="selectHero(hero)"></li>
- Interpolation
- Property Binding
- Event Binding