angularfire

AngularJS Firebase $add is not a function

泪湿孤枕 提交于 2020-01-24 00:15:27
问题 I try to push a new record to my Firebase. But everytime I receive a console error like this: $scope.contacts.$add is not a function Here is my code: app.controller('contactsCtrl',['$scope','$firebaseObject',function($scope,$firebaseObject){ var ref = new Firebase("https://<database_details>.firebaseio.com/contacts"); $scope.contacts = $firebaseObject(ref) $scope.addContact = function(){ $scope.contacts.$add({ name: $scope.name, address: $scope.address, telephone: $scope.telephone, company:

Firestore array-contains-any is not working properly

こ雲淡風輕ζ 提交于 2020-01-22 02:30:08
问题 "@angular/fire": "5.2.3", "firebase": "7.4.0", Note: members is an array and 0,1,2 is map data structures. service.ts getUserChatGroups(uid: string): Observable<DocumentChangeAction<MessageGroupMemberModel>[]> { return this.afs.collection<MessageGroupMemberModel>(`messageGroups`, ref => ref.where('members', 'array-contains-any', [uid])).snapshotChanges(); } page.ts init(): void { const uid: string = this.authService.getUserUid(); this.chatService.getUserChatGroups(uid).subscribe(res => {

Angular 4 Firebase angularfire Sorting a list by value

喜夏-厌秋 提交于 2020-01-22 01:29:30
问题 I am using Angular 4 Firebase and AngularFire and i have the following firebase database "users" : { "Test1" : { "totalscore" : 50, "username" : "test1" }, "Test2" : { "totalscore" : 30, "username" : "test2" }, "Test3" : { "totalscore" : 20, "username" : "test1" }, "Test4" : { "totalscore" : 10, "username" : "test1" }, "Test5" : { "totalscore" : 50, "username" : "test1" }, "Test6" : { "totalscore" : 30, "username" : "test2" }, "Test7" : { "totalscore" : 20, "username" : "test1" }, "Test8" : {

When working with a copy of a user in firebase $$conf is added to the object so I can't copy the user to a new location?

∥☆過路亽.° 提交于 2020-01-17 01:22:08
问题 Unless I am accessing a firebase user in an auth callback, the object has $$conf added to it which prevents me from creating a copy of a user profile to move to a new location. Is there any way around that? //any variation of this doesn't seem to work except for in an auth callback var teamRef = new Firebase('https://demo.firebaseio.com/teams/' + teamName); var teamList = $firebase(teamRef.child('profiles')); teamList.$set(user.uid, user); The user object logs out to this: e {$$conf: Object,

Angularfire User who can add images (attachments) to their Post

谁说胖子不能爱 提交于 2020-01-17 01:04:46
问题 Not a lot of clear documentation for a person as new to Angular/Angularfire/Firebase as me, at least for what I've been looking for: Currently, I users can be created and stored in my Firebase backend. Users can create a post. Right now it's based on any of the data the user inputs into the create post form. This works all fine and dandy, but I can't seem to find any documentation on how to allow something like image uploading into that post as well. Basically: I want a user to be able to

“ref.child is not a function” when adding .orderByChild.StartAt filter

不问归期 提交于 2020-01-15 05:01:11
问题 I have the following code in my controller to go to a firebase database node, loop through the records at that node and return a count of each of the status types into an array (to act as the data for a chartjs chart). The code also waits for changes (edits and deletions) and updates the array accordingly. This all works exactly as I want var ref = new Firebase("https://my-firebase-url/") ref.on('child_added', function (snapshot) { var status = snapshot.val().status.Status; updateStatusCount

AngularFire / Firebase - GET'ing a single element from $firebaseArray in order to use in DOM / $remove

孤者浪人 提交于 2020-01-14 22:53:10
问题 I am having some trouble using AngularFire / Firebase to get an individual record from a collection (and then, after I have it, $remove'ing it from the collection). I believe I'm following proper documentation located here: https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-firebasearray NOTE: a lot of documentation / blogs / answers I have found appear to use the deprecated $firebase service (with the $asArray method) - however, more recent docs identify that

AngularFire / Firebase - GET'ing a single element from $firebaseArray in order to use in DOM / $remove

让人想犯罪 __ 提交于 2020-01-14 22:51:33
问题 I am having some trouble using AngularFire / Firebase to get an individual record from a collection (and then, after I have it, $remove'ing it from the collection). I believe I'm following proper documentation located here: https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-firebasearray NOTE: a lot of documentation / blogs / answers I have found appear to use the deprecated $firebase service (with the $asArray method) - however, more recent docs identify that

Select specific item and view it in modal to update into Firebase using angularJs

我怕爱的太早我们不能终老 提交于 2020-01-14 05:54:08
问题 I have (add post) app which user can push data to firebase from it . User choose from dropdown list the category which will be Node in the firebase and after fill in the other info and submitted to firebase . In the view i iterate the data to show it as Category separated and from there the user can choose to edit/delete the post by pressing the button edit/delete. My Issus : 1- When user delete a post , the whole Category is deleted not the post which the user just want to delete. 2- when

$authWithPassword is not a function in AngularFire 2.x

时光毁灭记忆、已成空白 提交于 2020-01-14 02:04:22
问题 I've seen posts about this problem before, but they're either outdated or offer a solution very similar to my setup. Basically, I have two functions in my controller: authCtrl.login and authCtrl.register. The register's call to Auth.$createUserWithEmailAndPassword() works fine, but the login's call to Auth.$authWithPassword() does not, as I'm getting a "..is not a function" error. Can't for the life of me figure out what is wrong here. Here's my setup: auth.service.js: angular.module(