Created
June 7, 2015 20:45
-
-
Save erobit/86884f550891bb29f0e1 to your computer and use it in GitHub Desktop.
Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: permission_denied: Client doesn't have permission to access the desired data. | |
destroy called for FirebaseArray: https://MYURL.firebaseio.com/contacts | |
Error: Cannot call $add method on a destroyed $firebaseArray object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ContactApp') | |
.controller('ContactCtrl', function ($scope, Ref, $firebaseArray, $timeout) { | |
$scope.contact = {}; | |
$scope.contacts = $firebaseArray(Ref.child('contacts')); | |
$scope.save = function(form) { | |
if (form.$isInvalid) { | |
return; | |
} | |
$scope.contacts.$add($scope.contact) | |
.catch(alert); | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
".read": false, | |
".write": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment