...

/

Interpolation and One-way Data Binding

Interpolation and One-way Data Binding

Let's see how we can use interpolation for displaying data in our component's template.

What is interpolation?

We know that we have this set of life cycle hooks we can extend upon with our own code, but how does Angular handle data displayed properties in our component’s template? This is all part of interpolation.


Interpolation, or string interpolation, is where you see the text within the {{ }} brackets, telling Angular that it should interpret the text within these brackets and use one-way data binding to replace the text within the {{ }} brackets with the value of the property of the same name.


So, what does that mean? Well, when we talk about interpolation, we need to look at one-way data binding.

What is one-way data binding?


One-way data binding is where you have a property in your Component class, and when the value of that property is updated, this value is passed to the view. ...