0
Angularfireでテストを行い、オブジェクトをベースに保存するたびにブラウザがクラッシュする。スクリーンアップはアップグレードされましたが、ブラウザが正しく動作するように、タブの実行を停止してページを更新する必要があります。保存時にAngularfireがブラウザをクラッシュする
問題を引き起こしている可能性がありますか?以下
オブジェクトを保存するとき、コントローラコードです。
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();
}
});