You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2023/01/04 22:56:50 UTC

[GitHub] [cordova-ios] breautek commented on issue #1279: How to load sub index.html page to localhost in cordova ios

breautek commented on issue #1279:
URL: https://github.com/apache/cordova-ios/issues/1279#issuecomment-1371521242

   By default, the root folder is the `www` folder.
   
   So you can add sub folders inside `www` which contains web assets, including other HTML files.
   
   Assume you have a `www/subfolder/index.html` file, you can make that as the initial launch file by changing the `<content>` preference:
   
   ```xml
   <content src="subfolder/index.html" />
   ```
   
   Or you can navigate to files using standard javascript... suppose to have the following files for example:
   
   ```
   www/index.html
   www/subfolder/index.html
   ```
   
   While `www/index.html` is the loaded document, you can navigate to `www/subfolder/index.html` by using 
   ```javascript
   window.location.href = "subfolder/index.html";
   ```
   
   Likewise, while `www/subfolder/index.html` is the loaded document, you can go back up to `www/index.html` via:
   
   ```javascript
   window.location.href = "../index.html";
   ```
   
   This isn't a Cordova Bug so I'll be closing this issue. Any further questions can be asked in our [Discussions](https://github.com/apache/cordova/discussions).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org