angularfire

How to rename parent node?

我的未来我决定 提交于 2019-12-25 04:03:42
问题 I'm very new in Angularfire. I created a Firebase parent node, with several other parents. Now I need to know how to rename the main parent node. 回答1: You cannot rename it easily within the console, but you can add a new node with the same content "Meeting with..." and delete the existing node. 回答2: Thanks Björn, Finally I found it. $scope.addMeeting = function(){ if($scope.meetingEditCheck){ var key = $scope.editKey; var newPostKey = firebase.database().ref().child('users/' + firebaseUser

Building Chat App with Angularjs and Firebase

非 Y 不嫁゛ 提交于 2019-12-25 02:55:41
问题 using angularfire seed i would like to know if there is any tutorials about making a private chat between users something like in facebook. you pic a user and then you can chat with him. please let me know about any resources in this topic. using firebase and angularjs. 回答1: I recommend you to check out this great tutorial by thinkster.io Learn to build a Real-Time Slack clone with AngularFire 来源: https://stackoverflow.com/questions/31185527/building-chat-app-with-angularjs-and-firebase

Trouble with Firebase security rule involving .getPriority()

限于喜欢 提交于 2019-12-25 01:54:03
问题 I'm trying to let user set the priority of an item with "ref.setPriority(priority);" but I also want to make sure they can't set it to less than "current_priority -10". But this expression: ".write": "data.getPriority() - newData.getPriority() > 10" is giving me an error "expression: left operand is not a number". However: data.getPriority().length - newData.getPriority().length >=1 Sort of works (no errors on saving but gives me 'permission denied' when I try to set the priority) Does

Firestore security rules email_verified not working

末鹿安然 提交于 2019-12-24 18:52:36
问题 If I create a new user with createUserWithEmailAndPassword , even though I didn't verify the mail yet, that user is already logged in. And his .emailVerified === false , and until here all good. Now, I go to the mail, verify it using the link, go back to the web app, it is still .emailVerified === false so I refresh the page, now .emailVerified === true . So I try to reach this doc: public async getPublicUserDetails() { const currentUserId = this._angularFireAuth.auth.currentUser.uid; try {

Cannot set priority on $asObject()'s child keys using Angularfire 0.8

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 14:22:38
问题 According to the Angularfire docs, when working with an object returned through $asObject() , you can set priority for said object by defining a $priority property on the object and then using $save() . My code works great, but $priority isn't doing anything. Here's some code with complete explanations in the comments: app.factory('MyService', function($rootScope, $firebase) { // The complete Firebase url var ref = *obfuscated*; // Returning the dataset as an object containing objects var

Does AngularFire use Firebase's REST API?

偶尔善良 提交于 2019-12-24 12:54:39
问题 Does the AngularFire service use REST under the hood? If so is there no limits in the hacker plan, because the Firebase page on pricing says: REST API requests don't count towards your connection limits ? 回答1: The AngularFire library uses Firebase's regular JavaScript/Web SDK under the hood. Each client keeps a connection open to Firebase servers, so will count towards the connection limits. You can easily verify this yourself by creating a minimal AngularFire client and opening it in a few

Firebase API issue with AngularJS website example project

旧城冷巷雨未停 提交于 2019-12-24 12:26:26
问题 Beginning to dive into AngularJS so I went to their website, but got stuck on the wire up a backend portion where Angular uses Firebase. The first issue came from the ordering of dependencies: angular.module('project', ['ngRoute', 'firebase']) changed to angular.module('project', ['firebase', 'ngRoute']) But now it's telling my that $add , in my $scope.save call, is undefined. Similar $add undefined questions are here and here, but neither seem to apply. Note: I'm running node's http-server ,

Unable to get length of Firebase Objects

人盡茶涼 提交于 2019-12-24 11:37:46
问题 I am currently using AngularFire, and trying to get the length of objects in my database. In my Firebase, the structure looks like popping-fire-5575 celio -JgaQt-tNq-gRVIVZdCD artist: track: -JgaQuBoYk9VX3pWylx3 artist: track: -JgaQuf_pyBFJ7EA1Fo_ artist: track: In my controller, var profileObject = FirebaseDemo.getBroadcast($routeParams.param); var twotwo = profileObject.$asObject(); twotwo.$bindTo($scope, 'data'); When I console log the variable 'twotwo', I get in return Object $$conf:

Can't get Observable.of(true) to work in an AuthGuard in Angular2

风格不统一 提交于 2019-12-24 11:18:13
问题 Using Angular with AngularFire2 (Firebase package) and am trying to use a guard to prevent all users except one from accessing a specific route. But the code below won't work. I get the error: Class 'AuthGuard' incorrectly implements interface 'CanActivate'. Type 'void' is not assignable to type 'boolean | Observable | Promise'. import { Injectable } from '@angular/core'; import { CanActivate } from '@angular/router'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable

Firestore: snapshotChanges is not a function

强颜欢笑 提交于 2019-12-24 07:40:39
问题 In reference to this post, I hit a problem where it says snapshotChanges is not a function : TypeError: db.collection(...).snapshotChanges is not a function at new <anonymous> (index.js:139) at Object.instantiate (angular.js:5156) at angular.js:11719 at Object.link (angular-route.js:1251) at angular.js:1388 at Ba (angular.js:11266) at p (angular.js:10585) at g (angular.js:9832) at angular.js:9697 at angular.js:10111 "<ng-view autoscroll="true" class="ng-scope">" Below is my code: (Note that