angular.js - angularJS在Android WebView中无法正常调后台接口
巴扎黑
巴扎黑 2017-04-17 17:46:07
0
3
486

使用angular js框架写的h5页面,在浏览器中调接口,能正常访问并获得结果

但是放到Android的webview中时,调接口一直失败

看后台日志接口是调到了,但是结果不能正常返回

这个问题困扰了一天,挺影响项目进度的!

不知道有没有人遇到同样的问题

后台使用的tomcat 6.0,angular js打包的h5应用也是放着tomcat下的

巴扎黑
巴扎黑

reply all(3)
大家讲道理

The main problem is the mechanism of Angular js. When Angular js is not loaded properly and many things in Angular js are not initialized, the call fails due to calling the background interface

大家讲道理

Is the problem solved?

迷茫

I also encountered this problem today. The solution is
webView.getSettings().setDomStorageEnabled(true);//Enable DOM storage API function. It must be enabled
Hope it is useful to everyone

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template