Hello again, everyone.
So we created the model classes and the components that we're going to be using in our project.
Now we're going to start using the data binding features that we talked about, oh, not too long ago.
So, as you know, we talked about two different methods, one way binding and two way binding.
So we basically provide to the template and information flow from component to template with string
interpolation and property binding, right.
So we pass a template change to component with event binding.
Now, it could be just a click of a button or it can be something entered into an input field.
But anyway, two way binding is a combination of event binding and property binding.
So here we're going to talk about bilateral information, interaction, what?
Yeah, bilateral information, interaction to ensure.
You're going to keep this information in your head, but I want to build them into the project.
All right.
So let's first use the poverty binding method.
So for this, we're going to create a method in the repository model class.
So this method will give us the idea of our book.
And using the find method will find the idea of this list of books and then we can check to see if it
is equal to the incoming ID.
So this method will return information about this book to us with the incoming I.D. parameter.
And now I can use this information in the component.
And now I'll define a book type variable.
I'm sending its ID here.
Now, here we can use the incoming book information on the HTML page, so I'll create a div on the female
page and in my div I'll use the name of the book and we will print using the text content property with
the H3 element.
So in using the property binding.
We were inclosing square brackets than we write equal and we write the value between double quotes,
actually, as you know, we can achieve the same result just by using string interpolation.
So here, let's just write out an example of string interpolation during, yeah, using double braces
right here.
So now when we check the changes in the browser, we see that the name of the book is written in two
different ways.
Now, I want you to be careful about this particular point, a dumb object is created when the HTML
page is loaded in the browser, right.
And this object has an attribute just like this.
And we can equalize a value from this attribute.
And later, we'll talk about how to value a dumb object that does not have this attribute, but right
now we're using the existing features.
Right, my friend, so that is the property binding method in use, we're going to talk about class
binding and our next lesson.
So I'll see you then.
Bye for now.