Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : How should I mix data from 2 different requests in a single view?

$
0
0
View parts may be rendered as soon as data arrives. So consider this view:

  1. {{#general}}
  2. <p>Name: {{name}}</p>
  3. {{/general}}
  4. {{#details}}
  5.       <p>age: {{age}}</p>
  6.       <p>status: {{status}}</p>
  7. {{/details}}

Say in your code you have first request that gets general info data, and second request that gets details.

View will render #general as soon as view scope's "general" attribute is filled with data, and #details as soon details data ready and "details" attribute is set.


Viewing all articles
Browse latest Browse all 3491

Trending Articles