IBM Worklight 6.1 - Why is Cordova code not working when placed in a sub-page?

后端 未结 1 792
忘掉有多难
忘掉有多难 2020-12-22 07:51

I tried out the Cordova camera example inside my Worklight application.
It works only when the camera code is inside the main HTML file (index.html).

When I place

相关标签:
1条回答
  • 2020-12-22 07:58

    Worklight is a Single Page Application. Thus you cannot simply load another HTML file and expect your application to continue functioning; this includes Cordova.

    Read the "Building a multi-page application" training module and review the accompanying sample project, to better understand how to create a multi-page application.

    You can also review these sample applications (after reading the training module):

    • JQM_multipage_load_changePage.zip - uses either .load or .changePage
    • JQM_multipage_changePage_pageshow.zip - uses .changePage and .pageShow
    0 讨论(0)
提交回复
热议问题