angularfire

Setting users' own key in Firebase

无人久伴 提交于 2019-12-12 02:50:07
问题 The question is asked already here, but since AngularFire updates their API, the provided solution is not usable anymore. What I am doing is to create new user's account with email/password, store that user in Firebase Authentication service, and store extra information in the database. However, in the Authentication, user has their key as simplelogin:29 , and in the Data, each user has their hashed key, as -JpwB9oUVkeT_XRdiX2V . I do need their keys to be the same. Below is the code to

Firebase Reference not returned after add

老子叫甜甜 提交于 2019-12-12 02:39:27
问题 I do something like this: var temp = $scope.names.$add({"firstname" : $scope.firstname, "lastname" : $scope.lastname, "school" : $scope.selectedSchool}); I get a returned object, but when I try $log.log(temp.toString()); I get just the object, whereas the documentation for firebase says I should see the path to the string of my new firebase URL. I also tried $log.log(temp.name()); And same result, is this related to the implementation of those "functions" in angularfire, or to actual firebase

Can't get Firebase reference to ID to define current user

荒凉一梦 提交于 2019-12-12 02:16:27
问题 I think I am getting my keys, arrays, values and IDs mixed up here but can't seem to figure it out. I want a way to get the current user in a ProfileCtrl controller. This is my current implementation using promises, $waitForAuth and once . But I am not sure if implementing currently. var user = ""; var key = ""; var uids = Users.allUIDs(); console.log(uids); Auth.$waitForAuth().then(function () { var uid = Auth.$getAuth().uid; console.log(uid); for (var i = 0; i < uids.length; i++) { console

AngularFire - Firebase not defined

感情迁移 提交于 2019-12-12 01:26:14
问题 Trying to use AngularFire for a simple Angular polling test app to store basic objects. I've tried injecting $firebase (which logs an error advising me this is deprecated in favor of $firebaseObject and $fireBaseArray). Injecting either of these results in same issue unchanging. I've searched around, but most posts I've found refer to bower.json syntax errors or something specific to JShint. It does not appear to be either of these for me. Error message ReferenceError: Firebase is not defined

Angular + Firebase + AngularFire Seed Directive ShowAdmin

守給你的承諾、 提交于 2019-12-11 21:25:17
问题 First, a wordy up-front description of my situation... My application is utilizing Angular.js and AngularFire to run without a backend. I am using Firebase Simple Login for authentication, and the AngularFire-Seed project provides a simple way to get auth info. To create an administrator in the application, I'm storing a user's uid in /admin in my Firebase, so I can check if /admin/simpleLogin:45 exists, for example, to see if the user with uid simpleLogin:45 is an admin. I'm trying to create

Firebase Reference not returned after add has been called

匆匆过客 提交于 2019-12-11 20:56:47
问题 This is basically a duplicate of this question (I'm sorry for duplicating), but it is on another project, I seem to keep having issues with this, so I am hoping someone can look at the code I have and explain what I keep doing wrong. Basically I call ADD and I don't get a return value....I am not entirely sure what could be causing it. function MyController($scope, $firebase, $http, $log) { var FB = "https://onaclovtech-home.firebaseio.com/apps/dog/"; // Enter in your FB name var ref = new

How to execute callable functions using AngularFire2

a 夏天 提交于 2019-12-11 15:14:34
问题 Callable functions in firebase can be executed as below: firebase.functions().httpsCallable('addMessage'); I am wondering what is the equivalent of this in AngularFire2. I have scanned the documents and don't see any mention of this. If there is no equivalent then how do i obtain a handle to underlying firebase object in AngularFire2 ? 回答1: Make sure you update your angularfire2 version to RC9 or higher - as this is when the PR was merged. npm install angularfire2@latest Add

Returning $key in AngularFire 5

你离开我真会死。 提交于 2019-12-11 15:10:01
问题 I have the following code that works with AngularFire 5: export class NavigationComponent { items: Observable<any[]>; constructor(db: AngularFireDatabase) { this.items = db.list('/pages', ref => { let query = ref.limitToLast(100).orderByChild('sortOrder'); return query; }).valueChanges(); } } But now need to return item.$key which apparently is no longer returned by default in AngularFire 5. I see mention in the migration guide of needing to "map" this, but can't seem to get the right syntax

Firestore + Ionic Angularfire Read Count & Cache Persistent

情到浓时终转凉″ 提交于 2019-12-11 14:30:09
问题 I'd like to use Ionic 4 + Firestore to provide app with offline and live sync capability. Target deploy to Native App (iOS, Android), electron App (Windows and Mac), PWA. Is firestore local cache persistent in hybrid app? What type of storage firestore cache using? Will it be something like localstorage, which will be delete by android / iOS from time to time / while low storage. I'm testing with below code and did enablePersistence, offline mode is working just fine. But it seem that the the

angularfire, remove method returns 'Invalid record; could not find key', what should it be happenning?

你说的曾经没有我的故事 提交于 2019-12-11 13:06:25
问题 I'm currently developing a webapp with angularjs and firebase, while I am able to save new records I am not able to remove a record using someReference.$remove(varkey); the promise returns: 'Invalid record; could not find key' but the same reference is able to save items normally. i trim spaces on the varkey but yet all seems to fail, I'm using bower dependency which version is "angularfire": "~0.8.0" according to bower.json So far my code in my service is: var testRef = new Firebase('https:/