Property Binding in Angular| DOM Property Binding | Interpolation vs Property Binding |Part 9

Опубликовано: 14 Октябрь 2024
на канале: Code with Salman
116
13

TypeScript Data Type - Void
Similar to languages like Java, void is used where there is no data. For example, if a function does not return any value then you can specify void as the return type.
The Property Binding in Angular Application is used to bind the values of component or model properties to the HTML element. Depending on the values, it will change the existing behavior of the HTML element. The syntax to use property is: [property] = ‘expression’

In Property Binding, there is a source and target. For example, consider the below span tag.

span[innerHTML] = ‘FirstName’.

Here, innerHTML is the target that is a property of span tag and FirstName is the source that is the component property.