I sometimes come across {{}}
syntax and sometimes [[]]
in the template data binding. I am rather sure [[]]
usage, which is referring the properties in the component,but what does {{}}
do?
From https://www.polymer-project.org/1.0/docs/devguide/data-binding
Binding annotation Text surrounded by double curly bracket (
{{ }}
) or double square bracket ([[ ]]
) delimiters. Identifies the host data being bound. Compound binding A string literal containing one or more binding annotations.Whether data flow goes down from host to target, up from target to host, or both ways is controlled by the type of binding annotation and the configuration of the target property.
Double-curly brackets (
}
) support both upward and downward data flow.Double square brackets (
[[ ]]
) are one-way, and support only only downward data flow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With