Template stamping w/o data binding in either direction.

20 views
Skip to first unread message

Joe Gregorio

unread,
Aug 18, 2015, 4:27:46 PM8/18/15
to Polymer
After having used Polymer 0.5 and now 1.0 for a set of projects I've realized that the vast majority of my templates don't need data binding at all. For example, most of the time JSON data arrives via XHR and I then stamp out some HTML from a template and never touch the data again. Or if I do touch the data again it's a whole new blob of JSON from the server and I just want to stamp out replacement HTML. 

Is there a way to use the <dom-module> templating in a way that doesn't set up data-binding? I think this breaks down into two questions:

1. Is there a way to use <dom-module> templating where I can force it to restamp after modifying the data, so that I don't have to use the .set() and .notifyPath() methods?
2. Is there a way to use <dom-module> templating where it doesn't set up any data observers?

I'd like to keep using the same templating syntax for all templates, i.e. both with data binding and w/o data binding, I'd hate to have to switch to a different templating library when I don't need data-binding.

  Thanks,
  -joe
Reply all
Reply to author
Forward
0 new messages