filmov
tv
How to create custom 2 way bindings in Angular - (3 minutes tutorial)

Показать описание
#angular #custom #2way #bindings
This is short tutorial on how to create custom 2 way bindings in angular.
Code example
in html :
--------------------
--------------------
in component :
--------------------
public colorString=''
@Input() get color() {
}
set color(val) {
}
@Output() colorChange= new EventEmitter()
--------------------
and when you change value inside the component emit changes
--------------------
--------------------
This is short tutorial on how to create custom 2 way bindings in angular.
Code example
in html :
--------------------
--------------------
in component :
--------------------
public colorString=''
@Input() get color() {
}
set color(val) {
}
@Output() colorChange= new EventEmitter()
--------------------
and when you change value inside the component emit changes
--------------------
--------------------