Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 602 Bytes

Data-Binding.md

File metadata and controls

17 lines (11 loc) · 602 Bytes

Data-Binding-- Communication Between TypeScript Code and HTML Template..

Used to Output Data i.e from TypeScript to HTML

#1 - String Interpolation --  {{ data }}
    -- To Output Some TEXT Use String Interpolation 

#2 - Property Binding --  [property] = "data"
   -- To Change Some PROPERTY, HTML Element, Directive, Component use Property Binding 

###IMPORTANT -- Never Mix Them -- Breaks the APP   

Used to React to (user)Events i.e from HTML to TypeScript

#1 - Event Binding -- (event) = "expression"   

Used for Two-Way binding

#1 - [(ngModel)] = "data"