The App Designer in Intel XDK allows us to easily add and remove pages to our apps. In this case, I use the Intel's App Framework. I haven't tried another frameworks.
The page hierarchy is something like this:
index.html
--- page #p-1
------ sub-page #sp-1-1
------ sub-page #sp-1-2
--- page #p-2
------ sub-page #sp-2-1
While adding and removing pages is easy, it is quite difficult to set the "main page", i.e. first page to be displayed when app starts. If I don't want to delete some of my pages using App Designer, then the only thing I can do is to edit the HTML.
This is the typical form of nested tags:
<div id="p-1" class="upage">
<div id="sp-1-1" class="upage-content hidden"></div>
<div id="sp-1-2" class="upage-content"></div>
</div>
By placing hidden
next to upage-content
, the sub-page will be inactive. So we don't have to reorder the lines of codes.
But the rule for upage
is different. We have to reorder the lines of codes. For example:
<div id="p-2" class="upage">
</div>
<div id="p-1" class="upage">
</div>
This is surely inconvenient if we have many lines. With the editor, perhaps we can collapse the nested tags before moving our codes to avoid mistakes.
Is it really the best way to set the app main page or I just don't know that there are options somewhere in Intel XDK?
The editor is somewhat limited, and is constantly evolving. To my knowledge, this is the only way to set the App's main page. If you find this process clunky, it may be in your best interest to propose an enhancement or a new feature on their product's forums. (They have a pretty active community)
Their support forum is here: https://software.intel.com/en-us/forums/intel-xdk