1. Introduction to Angular's MVC and Data Binding - ShakthiSampath/Learning-Angular.io GitHub Wiki

Data-Binding

Angular uses MVC

  1. 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

Data Binding Introduction

  1. 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
  2. Types of Data Binding


Code Snippet

<li>{{hero.name}}</li>
<hero-detail [hero]="selectedHero"></hero-detail>
<li (click)="selectHero(hero)"></li>
  • Interpolation
  • Property Binding
  • Event Binding

⚠️ **GitHub.com Fallback** ⚠️