3 ms·
I guess I wasn't clear enough. You're talking about data -> template binding. I'm talking about the reverse, where some data (as a model) is recovered from a p
by aviraldg 14y ago
I guess I wasn't clear enough.
You're talking about data -> template binding. I'm talking about the reverse, where some data (as a model) is recovered from a partial server-side render of the page, based upon the "patterns" described in the templates.
For example, if Angular did this (I don't think it does), it could traverse the generated HTML and compare it with the original template to figure out what's what.
- rio517 14y agoI haven't explored what your describing, but I'm using a different solution. I'm adding backbone to an existing project and added some server side code that outputs the current model object as json in a <script> tag in the html page. This is passed to a new backbone model instance.