Can't understand one way binding in Angular2
For Binding Documents Angular2 [target]="expression"
create a one-way binding from the data source to view the targets. But when I do this target="HELLO WORLD"
it works great. Shouldn't the second command give me an error?
+3
source to share
2 answers
You are using two different types of data binding methods provided by AngularJS function
[target] = 'expression'
is a type of property binding. and
target = 'expression'
- an example of string data binding.
Both will work in this scenario. You can read more about them to understand their different use cases.
This article can help you Angular 4 data binding
+1
source to share