Closed vibgy closed 8 years ago
Hi @vibgy! Please provide a minimal repro and version info.
Never mind. I'll close the issue. I had not configured the rules in firebase console properly. On Wed, Jan 27, 2016 at 7:54 AM katowulf notifications@github.com wrote:
Hi @vibgy https://github.com/vibgy! Please provide a minimal repro and version info.
— Reply to this email directly or view it on GitHub https://github.com/firebase/angularfire-seed/issues/93#issuecomment-175702377 .
Error, when I try to send the form to Firebase Cannot call $add method on a destroyed $firebaseArray object My security JSON
{
"rules": {
"projects": {
".read": "root.child('users').child(auth.uid).child('active').val() == true",
".write": true
},
"users": {
"$users": {
".read": true,
".write": true
}
}
}
}
Console error
Error: Cannot call $add method on a destroyed $firebaseArray object at Object.d._assertNotDestroyed (https://cdnjs.cloudflare.com/ajax/libs/angularFire/1.1.3/angularfire.min.js:12:5167) at Object.d.$add (https://cdnjs.cloudflare.com/ajax/libs/angularFire/1.1.3/angularfire.min.js:12:1986) at Scope.$scope.addSurvey (http://localhost:9000/scripts/controllers/profile.js:73:35) at fn (eval at <anonymous> (http://localhost:9000/bower_components/angular/angular.js:14086:15), <anonymous>:4:218) at expensiveCheckFn (http://localhost:9000/bower_components/angular/angular.js:15076:18) at callback (http://localhost:9000/bower_components/angular/angular.js:24546:17) at Scope.$eval (http://localhost:9000/bower_components/angular/angular.js:16820:28) at Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:16920:25) at HTMLButtonElement.<anonymous> (http://localhost:9000/bower_components/angular/angular.js:24551:23) at HTMLButtonElement.jQuery.event.dispatch (http://localhost:9000/bower_components/jquery/dist/jquery.js:4732:27)
Once you call $destroy, you can no longer use the object. That's entirely the point.
I had similar problems but i configured the rules in firebase console and it works properly
Cannot call $add method on a destroyed $firebaseArray object