web - Double Brackets [[ ]] vs Double Braces {{ }} in Polymer -


what's succinct way explain difference between double brackets ([[...]]) , double braces ({{...}}) in polymer 1.0?

for instance, in documentation <iron-list> element sample html shows:

<template is="dom-bind">   <iron-ajax url="data.json" last-response="{{data}}" auto></iron-ajax>   <iron-list items="[[data]]" as="item">     <template>       <div>         name: <span>[[item.name]]</span>       </div>     </template>   </iron-list> </template> 

why data bounded double braces in 1 spot (last-response="{{data}}") bounded double brackets (items="[[data]]") in spot?

binding can either one-way (using [[]]) or two-way (using {{}}, use notify).

to explain *-way binding think traffic. one-way binding when update model, view gets updated. when vice-versa true two-way binding.

for more information see documentation.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -