IBM Worklight 6.1 - Why is Cordova code not workin

2019-01-29 13:01发布

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 it in another HTML file, it does not work.
Why is that? What am I missing?

1条回答
一夜七次
2楼-- · 2019-01-29 13:19

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):

查看更多
登录 后发表回答