Angular 07: Attribute Binding

0
124

Như ở bài trước đã được biết Data Blinding trong angular và biết cách đổ dữ liệu từ component ra view bằng Property Binding. Trong bài viết này chúng ta sẽ học cách sử dụng Attribute Binding trong angular.

1. Cách sử dụng :

Hôm nay chúng ta tạo một bảng trong file html:

Sau đó bên trong file .ts các bạn tạo các biến sau:

Chúng ta tạo các biến này để sử dụng cho các attribute của thẻ table và thẻ td.

Quay trở lại file html bạn sử dụng ngoặc [] để hiện thị value thừ component ra view:

Ngoài ra các bạn có thể dùng cú pháp này:

  • Sử dụng keyword bind- :

  • Attribute binding sử dụng interpolation :

để sử dụng các biến mình đã tạo trong file .ts trong ví dụ này mình sẽ sử dụng [] để hiển thị:

Sau đó chạy lại project kết quả hiển thị như sau:

2. Lời kết:

Trong bài viết lần này chúng ta đã biết được thêm một cách nữa để blinding dữ liệu từ compoent ra view trong bài sau chúng ta sẽ được học thêm một cách nữa các bạn chú ý theo dõi nhé.

Chúc các bạn học tập tốt!

 

 

 

Buy Cisco 640-692 Exam Download

But it really is not easy to say, because the theater is the theater of war, when flying a 40 fire over is a big Cisco 640-692 Exam Download trouble. I remember very clearly that when I was a child, I was poor at home.In the 1980s, veteran cadres were not wealthy. He is a flawed soldier.Because, most of his feelings, but also a strong personality I do not understand, do you like to see Cisco 640-692 Exam Download no personality Zhuang it What do you think What are you trying Cisco 640-692 Exam Download to see Not complain is the truth, what do you want to see Do you say it And I did not write for you, ah, I Supporting Cisco routing and Switching Network Devices did not take the money, in my own post is not to say what to say Oh, I do not have the obligation to entertain the public It seems no. Of course, there was no running around the hammer.However, it is not a big problem so I did not finally open it back. Even before leaving the barracks, Cisco 640-692 Exam Download they deployed anti reconnaissance tactics to send empty vehicles to other routes, Large forces 640-692 Exam Download Advanced Routing and Switching 640-692 clandestinely opened. The beautiful white dress left in my memory forever, as a deep pain of youth.At that time it was autumn, not late autumn, but the troops Advanced Routing and Switching 640-692 Exam Download have been unified for the autumn, our physical training finished off the sweaty camouflage short sleeved sweater, the wind is really cold on the body.

Later, in the living room where Li Wenbao Supporting Cisco routing and Switching Network Devices was Cisco 640-692 Exam Download now a silver bearing house. At the moment, the factory is 640-692 Exam Download too busy. The Cisco 640-692 Exam Download 640-692 Exam Download man smiled and said There are Advanced Routing and Switching 640-692 three kinds of people on the wine field that can t be Cisco 640-692 Exam Download underestimated.

We know that you are a long awaited person and a person who can see through for a hundred years. My mother in law and aunt, if we are not starting from utilitarian purposes, in order to rehearse your mighty and powerful drama, we are so pragmatic and serious, just for your life, for the ridiculous pile of you who have not died before, we are not I will do this even if it s for art seen 60 years ago, although you re 640-692 Exam Download http://www.testkingdump.com/640-692.html rolling over, but Cisco 640-692 Exam Download 60 years later, our lives are happening all the time. Now Cisco 640-692 Exam Download she doesn t say that she has started to blame the window for opening. In fact, in our hearts, we still want to find an opportunity or an appropriate opportunity to break the ice between us to make up for between Advanced Routing and Switching 640-692 us. to cover my own eyes, we turn a blind eye to the crops and plants that can be seen everywhere so we lose. The end of Supporting Cisco routing and Switching Network Devices the matter is that the owner of the green wheat is no longer a big brother, but the wife of our relative Liu Chuan has not listened to it.

BÌNH LUẬN

Vui lòng nhập bình luận của bạn
Vui lòng nhập tên của bạn ở đây