Data Binding - Angular (Tutorial #6)

preview_player
Показать описание
In this video we will learn about Data Binding in Angular. Data Binding allows to define communication between Component and View.

So we can say DB is process where data is passed from Angular Component to the view(template) and from view to component.

There are four forms of data binding and they differ in the way the data flow.
1) Interpolation . {{ }}
2)Property Binding [ ]
3)Event Binding ( )
4) Two way binding [( )]

Interpolation:

Interpolation provides the data binding from component to view. Interpolation is one way data binding It binds from Component class to the template

Property Binding:
Property binding allows us to bind Property of view element to the value of template expression

The property binding uses the [ ] bracket. The binding target is placed inside the square bracket. The binding source is enclosed in quotes

Difference between Interpolation and Property Binding:
If I talk about Interpolation – it requires expression to return a string. So if you want to set element property to a non string data value - we must use property binding

Event Binding:

The interpolation and property binding are one way binding from component to view.
Event binding is used to perform an action in the component (may be executing a method) when user-raise a event – like click on button
Event binding uses the parenthesis. And name of the event is enclosed in parenthesis and then it assigned to the statement which mostly the method in the component class

Two-way data binding:

2 way data binding means changes made in component data should sync to the view so any changes made in the view are immediately updated in the respective component data
Two way binding is used mainly in data entry forms whenever user makes any changes in the data we would like to update our model in the component with new data and if model changes, we would like to update view as well

Angular uses combination of property binding and event binding by using ngModel directive

If you liked this video don't forget to subscribe my channel
Click subscribe for more updates:

Connect with me:
Рекомендации по теме
Комментарии
Автор

Nisha, you are an excellent trainer with expertise in the subject. You explained such complex concepts/topics of angular effortlessly. I am a big fan of you. I watched your whole angular series and only one word, it is awesome. I have never seen such a detailed explanation of Angular Topics. You really made our life easy. Thank you so much and Hope you will continue to share your knowledge with strugglers.

abhisheksoni
Автор

Best video ever seen on Data Binding..You have unique way to teach complex things easier

-cs
Автор

Such Clear and Concise explanation!!! Much appreciated.

ashimroy
Автор

Thank you so much, the video is so good. It is easy to understand, much better than other top rank videos.

half-bloodprince
Автор

Well done! Excellent tutorial! Thank you very much and greetings from Switzerland!

michaelegli
Автор

Very nice explanation. Really helps to understand the Angular from scratch.

jinthasyed
Автор

Very nice of you to give us these tutorials. Thank you very much indeed

moldovandorin
Автор

Explaing very well with examples and also thanks to giving notes about concepts under the down of the video

nareshkuruva
Автор

Awsome way of teaching.. full ropic knowledge.. and the way you teach is just superb👌🏻👌🏻👌🏻👌🏻

canada_c_apture
Автор

That was awesome explanation. Thanks for clarifying such crucial concepts 🙏.

jasonbourne
Автор

Perfect precise and on point explanation, subscribed and Thank you please keep uploading more videos 👌

kushaalrana
Автор

The best tutorial in the world thank you very much I wish I could give you more then one likes 👍

muxammad
Автор

Amazing tutorial. clears all the doubts of data binding

apoorvgupta
Автор

One of the Best Tutorial clear explanation sister Very Smooth and Clear

EvilDeveloper
Автор

Thank you Nisha! Peace between China and India.

donaldli
Автор

Thank you so much I understood very much

nifasa
Автор

Hey Nisha..Wonderful video on Data Binding. Thanks.

Avaneesh_Mishra
Автор

Thanks for this video, it is really helpful

shubhamSharma-eejc
Автор

very nice explanation thank you very much

morlaadarsha
Автор

hi nisha your videos and explanations are an awesome... also could you please upload a sample project....

vasanthapandiyanm