Wednesday, October 18, 2023

Attribute Binding in Angular Sample Example

 Please Refer to the previous example of mine. 

https://dotnetbyudayrajakonda.blogspot.com/2023/10/angular-event-binding.html


Attribute Binding:  Binding component variable to html Element is  called as Attribute Binding.

Syntax:

<tagname [attr.attributename]="varname" >

atrribute binding is required when html element attribute is not having corresponding DOM object property.


html element                                                     DOM


<input type="text"-------------------------> text box object

 value="..."                                                value property


td colspan="..."----------------------------->td[table data] obje

                                        no colspan property , so this required attribute binding






.html changes



output










No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...