Property
-
attribute property 차이Front-End/Angular 2018. 2. 1. 16:26
@Component({ selector : 'app', template : ` Property vs attribute binding: ` }) class AppComponent { greeting : string = 'A value'; onInputEvent (event : Event) : void { let inputElement : HTMLInputElement = event.target; console.log(`The input property value = ${inputElement.value}`); console.log(`The input attribute value = ${inputElement.getAttribute('value')}`); console.log(`The greeting pro..