【发布时间】:2015-04-10 12:35:01
【问题描述】:
我正在尝试在 NodeJS 中使用环回 API REST(带有 mongodb 连接器)设置 Firebase 的替代方案,当我在 AngularJS 中的 PhoneGap 应用程序中使用 $http 资源实现它时, 它不像 Firebase 那样实时更新。
我的工厂是这样的:
function syncUsers(){
return $http.get(userUrl).then(function(res){
return res.data;
});
在我的控制器中:
UserSrv.syncUsers().then(function(res)
{ $scope.data.users = res});
我的问题是:为什么我的应用程序不更新旧数据,为什么我需要刷新应用程序才能获得新数据?
谢谢。
【问题讨论】:
-
你的问题是?
标签: angularjs node.js mongodb cordova firebase