首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Angularfire在保存时使浏览器崩溃

Angularfire在保存时使浏览器崩溃
EN

Stack Overflow用户
提问于 2017-04-01 00:38:23
回答 1查看 28关注 0票数 0

我在Angularfire上做测试,每次我把一个对象保存到基础上,浏览器就会崩溃。屏幕向上升级,但我必须停止执行选项卡并刷新页面,以便浏览器再次正常工作。

有没有人知道可能是什么导致了这个问题?

Firefox Crashes

下面是保存对象时的控制器代码。

代码语言:javascript
复制
angular.module("AlbionTrading").controller("indexCtrl", function ($scope, $firebaseObject, $firebaseArray) {

//Pega objeto direto no Firebase
var ref = firebase.database().ref('AppSettings/');
// download the data into a local object
var syncObject = $firebaseObject(ref);
// synchronize the object with a three-way data binding
// click on `index.html` above to see it used in the DOM!
syncObject.$bindTo($scope, "appName");


//Pega array de objetos no Firebase
var cities = firebase.database().ref('Cities/');
$scope.cities = $firebaseArray(cities);

var posts = firebase.database().ref('Posts/');
$scope.posts = $firebaseArray(posts);


$scope.adicionarPost = function (post) {
console.log(post);
$scope.posts.$add({
    Cidade: post.Cidade.Name,
    Text: post.Text
});
delete $scope.post;
$scope.postForm.$setPristine();
}
});
EN

回答 1

Stack Overflow用户

发布于 2017-04-17 04:33:00

尝试使用旧版本的firebase..我也有同样的问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43145690

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档