I was wondering if there were any best practices for when 
attributes/databinding should be used to pass information, and when that 
information should be passed as light DOM to be inserted using a <content> 
tag. 

More specifically, I want to display a contact's information: 

Before polymer, this would have look like:
<span class="contact">
    <img src="picture">
    <span class="information">
        <div class= "name">DennisJeong</div>
        <div class="phoneNumber">123456789</div>
    </span>
<span> 

Now, I'm wondering whether it should be: 
1.
<custom-contact picture-src="{{contactPic}}" name="{{contactName}}" 
phoneNumber="{{contactNum}}"></customContact>
with a shadow dom that looks like the pre-polymer information above.

or

2. 
<custom-contact> 
    <img src="{{contactPic}}" picture>
    <div name>{{contactName}}</div>
    <div number>{{contactNum}}</div>
</custom-contact>
with the proper content tags putting those in the proper place using 
attribute selectors? 

Thanks,
Dennis

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/65c14110-1392-4186-a884-0612b2ea5e71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to