0
我在Worklight http request
执行后显示页面中的内容时出现问题。Ionic Worklight页面在HTTP请求后不显示
奇怪的是,当我去到另一个页面,我回来时,内容得到显示。这就像是需要刷新什么的。我可以看到console.log()
数据已收到,但页面未刷新。
这是我的代码:
$stateProvider.state('accounts', {
url: "/accounts",
templateUrl: 'views/accounts.html',
controller: function($scope, $ionicScrollDelegate, $rootScope){
var req = new WLResourceRequest("/adapters/JavaMQ/bankmq/getAccounts/"+$rootScope.globalReqUserId, WLResourceRequest.GET);
req.send().then(function(resp){
var x2js = new X2JS();
resp.responseText = x2js.xml_str2json(resp.responseText); //to JSON
$scope.reqUserId = resp.responseText['ASI_Message']['Riyad_Bank_Header']['Requestor_User_ID'];
$scope.accountsList = resp.responseText['ASI_Message']['Repeating_Group_Section']['Repeating_Group'];
console.log($rootScope);
})
}
});
更新: 我注意到,我也不断得到当我提出这个项目到Windows以下
Deviceready has not fired after 5 seconds
Channel not fired: onCordovaInfoReady
Channel not fired: onCordovaConnectionReady