Dynamic template

67 views
Skip to first unread message

Praveen Kumar Gulati

unread,
Dec 22, 2015, 1:26:22 PM12/22/15
to Polymer
How do I create form at runtime based on json data received from server. Basically data decides the fields itsel . Currently I used dot template engine to create a polymer web component itself. Can't I use polymer templatizer itself to create form. So basically dynamic dom-module
Or let me put in other words can I create children in light Dom at runtime and still use two way data binding

Eric Bidelman

unread,
Dec 22, 2015, 2:56:40 PM12/22/15
to Praveen Kumar Gulati, Polymer

Yep. You can server the markup from the server and use bindings in the main page with dom-bind.

https://www.polymer-project.org/1.0/docs/devguide/templates.html#dom-bind


On Tue, Dec 22, 2015, 1:26 PM Praveen Kumar Gulati <pkgu...@gmail.com> wrote:
How do I create form at runtime based on json data received from server. Basically data decides the fields itsel . Currently I used dot template engine to create a polymer web component itself. Can't I use polymer templatizer itself to create form. So basically dynamic dom-module
Or let me put in other words can I create children in light Dom at runtime and still use two way data binding

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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/edd3c0de-04a4-49c7-9ec5-aedf35690cb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Praveen Kumar Gulati

unread,
Dec 24, 2015, 8:53:05 AM12/24/15
to Polymer, pkgu...@gmail.com
Yes that was one option, however requirement here is to have metadata driven client side UI with a very light server which just gives the metadata.

We wanted to support a high number of UI variations based on context, each variation is owned by client with APIs to store metadata alone on server.

Thanks for reply..
Reply all
Reply to author
Forward
0 new messages