Is there any way I can cache templates or pages in Meteor or Iron-Router?
I'm trying to build a mobile application and the issue is that scroll position is lost and DOM elements need to be recreated on page changes.
Is there any way I can cache templates or pages in Meteor or Iron-Router?
I'm trying to build a mobile application and the issue is that scroll position is lost and DOM elements need to be recreated on page changes.
所以你的问题不是很清楚,但基本上你在滚动位置上有问题吗?
快速回答是没有元素没有缓存,因为 Iron Router (IR) 正在破坏它们,这是一件好事。Meteor 本身是一个单页应用程序,因此滚动位置可以由 IR 控制。
看看这个包是否有帮助:https ://atmospherejs.com/okgrow/iron-router-autoscroll
同样,很难给出明确的答案,因为您的问题含糊不清。