Angularjs 如何使用angular js在Cordova中插入#引用
我有一个angular js应用程序,我正试图将其包装为Cordova移动应用程序 url在浏览器上运行正常,但在移动浏览器上重定向有一些问题。当我试图打印url的绝对位置时,我会被重定向到类似的urlAngularjs 如何使用angular js在Cordova中插入#引用,angularjs,cordova,angularjs-scope,phonegap-build,Angularjs,Cordova,Angularjs Scope,Phonegap Build,我有一个angular js应用程序,我正试图将其包装为Cordova移动应用程序 url在浏览器上运行正常,但在移动浏览器上重定向有一些问题。当我试图打印url的绝对位置时,我会被重定向到类似的url file:///Users/mac/Library/Developer/CoreSimulator/Devices/69F93249-284F-4F04-82CA-14B111CCA50F/data/Containers/Bundle/Application/B21EB426-7066-4425
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
调用索引页时,url中缺少一个/
加载index.html后如何追加/
编辑:第一次加载应用程序时,显示已加载以下文件:
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#/
但我打算加载的只是
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
我在config.xml中调用
<content src="index.html" />
试试看
更多信息:
这是一个严格意义上的角度问题。Cordova/Phonegap不关心
.html.
后面的路径有什么问题?是否要完全删除#?这个index.html#/
对我来说似乎没有错。你有什么问题?
$locationProvider.html5Mode(true)