Jquery Mobile - including fragments for a multipage template?

北城余情 提交于 2020-01-06 15:52:10

问题


We're doing a Codeigniter/jQM web application and have been debating the multipage template vs. single-page/file.

Most of the cons of the multi-page template (meaning multiple data-role=page divs in a single file) cited relate to the single file getting unwieldy from a maintenance (and possible load time) perspective. The cons of the single-page approach seem to mostly focus on potential latency between pages. Given the vagaries of the internet, the latter approach seems more risky. It is my opinion that a user will tolerate a long load time if the app runs smoothly once loaded much more than an app that is inconsistent between touches/swipes.

That being said, we have a growing team of folks who are working on various parts of the app and having one, huge file presents a challenge -- even for Git.

So, my question is this:

Is there a reason we can't we break up the multi-page template into separate files, each containing the <div data-role=page> and all its contents, and just -include- each one in the main file? That would seem to solve the maintenance issue and alleviate the potential delay between page transitions.

What am I missing, here?


回答1:


And the answer is no. It works fine.



来源:https://stackoverflow.com/questions/31353325/jquery-mobile-including-fragments-for-a-multipage-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!