I m 使用有铁路的后装机(3.1)。 我有一个搜索页。 第一次搜索结果显示所有结果都ag缩,在页面负荷时应当提供。 后来的搜索要求将使用主干。 我如何在不违反南斯拉夫联邦共和国的情况下这样做?
我可以做所有关于后台的要求,但(1) 要求增加第2页的主干,以便启动收集工作。
来源:
Loading Bootstrapped Models When your app first loads, it s common to have a set of initial models that you know you re going to need, in order to render the page. Instead of firing an extra AJAX request to fetch them, a nicer pattern is to have their data already bootstrapped into the page. You can then use reset to populate your collections with the initial data. At DocumentCloud, in the ERB template for the workspace, we do something along these lines:
<script>
Accounts.reset(<%= @accounts.to_json %>);
Projects.reset(<%= @projects.to_json(:collaborators => true) %>);
</script>