I have a angular js application which I am trying to wrap it as a Cordova application for mobile.
The url is working fine on browser but redirection on a mobile browser has some issue. When I tried to print the absolute location of the url I am redirected to a url something like
file:///Users/mac/Library/Developer/CoreSimulator/Devices/69F93249-284F-4F04-82CA-14B111CCA50F/data/Containers/Bundle/Application/B21EB426-7066-4425-82F0-6F73736D880C/ClientManagement.app/www/index.html#/dashboard
There is a / missing from the url when the index page is called.
How can I append the / after index.html is loaded
Edit: When the app is first loaded its indicating that following file is loaded:
file:///Users/mac/Library/Developer/CoreSimulator/Devices/69F93249-284F-4F04-82CA-14B111CCA50F/data/Containers/Bundle/Application/B21EB426-7066-4425-82F0-6F73736D880C/ClientManagement.app/www/index.html#/
But what I intend to load is just
file:///Users/mac/Library/Developer/CoreSimulator/Devices/69F93249-284F-4F04-82CA-14B111CCA50F/data/Containers/Bundle/Application/B21EB426-7066-4425-82F0-6F73736D880C/ClientManagement.app/www/index.html
In config.xml I am calling
<content src="index.html" />
Try,
$locationProvider.html5Mode(true)
More Information: AngularJS routing without the hash '#'
Removing the fragment identifier from AngularJS urls (# symbol)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With