Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push call not working from javascript #5

Open
Marvin256 opened this issue Feb 10, 2016 · 1 comment
Open

push call not working from javascript #5

Marvin256 opened this issue Feb 10, 2016 · 1 comment

Comments

@Marvin256
Copy link

Thank you for the patch but I have an issue : If you call the push method from your javascript like this :

PUSH({url: 'theme1.php', transition: 'slide-out'});

the transition to the new content doesn't work. I could see in phonegap debuger that the page is called but it doesn't apear.

It is of course working outside phonegap (on an apache web server for example)

Do you see what is going on with this one?

@Marvin256
Copy link
Author

Found that the issue is related with Phonegap that doesn't transform the url argument into something like file:///var/mobile/Containers/Bundle/Application/APP_NAME/UUID/www/theme1.html

I could workaround by getting the root path of my app (set this into the deviceraedy event) :

var documentsDirectoryPath = decodeURIComponent(window.location.href);
appRoot = documentsDirectoryPath.substring(0, documentsDirectoryPath.indexOf("index.html"));

Then the push call should look like this:

PUSH({url: appRoot + 'theme1.php', transition: 'slide-out'});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant