2017-03-31 146 views
0

我正在Angularfire上進行測試,並且每次將對象保存到基礎時,瀏覽器都會崩潰。屏幕升級但我必須停止選項卡的執行並刷新頁面,以便瀏覽器再次正常工作。Angularfire在保存時崩潰瀏覽器

有人會知道什麼可能會導致問題?

Firefox Crashes

下面是控制器代碼保存對象時。

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(); 
} 
}); 

回答

0

與舊版本的火力點的試試吧。我有同樣的問題