Skip to content
Md. Shohel Rana edited this page May 6, 2018 · 2 revisions

Two different ways of binding is in terms of inputs and outputs.

Input binding [] of a Component

  1. Binds Property
  2. Binds Attribute
  3. Binds CSS
  4. Binds Style Property
  5. Binds a Property to an Interpolated String,
  6. Sets up two-way Data Binding

Output binding () of a Component

The following list shows all type of event binding.

(focus)="myMethod()"  // An element has received focus
(blur)="myMethod()"   // An element has lost focus

(submit)="myMethod()"  // A submit button has been pressed

(scroll)="myMethod()"

(cut)="myMethod()"
(copy)="myMethod()"
(paste)="myMethod()"

(keydown)="myMethod()"
(keypress)="myMethod()"
(keyup)="myMethod()"

(mouseenter)="myMethod()"
(mousedown)="myMethod()"
(mouseup)="myMethod()"

(click)="myMethod()"
(dblclick)="myMethod()"

(drag)="myMethod()"
(dragover)="myMethod()"
(drop)="myMethod()"

Others

  1. Creates a Local Variable
  2. The * Symbol
  3. The Safe Navigation Operator