I am teaching myself Worklight. I followed the Get Started guide provided by IBM (http://www.ibm.com/developerworks/mobile/worklight/getting-started.html).
Examples in the above site use relative path to link to a page or getting images. Is it possible to put a / (foreward slash) in front of each link to make it relative to the root folder? If possible, how can I configure my local worklight server so the links and images work on the app?
I have app set up as below directory structures in the /common/ directory. Many pages load shared header and menu on the page. When I use <a href="/app-pages/page1.html">
' or <img src="/images/ImageName.png">
, This causes 404. Not Found - http://localhost:10080/images/ImageName.png
FYI, my dev environment is as below.
In a new Worklight application called "test", under the common folder you will have the following hierarchy:
In test.html, if I will add <src="images/icon.png"/>
then once previewing the app the icon.png image located in the images folder will be displayed:
I see that you are also trying to use multiple pages in your app. Make sure to read the Building a multi-page application training module.