angularfire

AngularFire $add—TypeError: undefined is not a function

て烟熏妆下的殇ゞ 提交于 2019-12-08 04:16:13
问题 When I try to substitute $add for push, I get this error. TypeError: undefined is not a function at Scope.$scope.sendComment (http://localhost:9000/scripts/controllers/post.js:22:38) at http://localhost:9000/bower_components/angular/angular.js:10847:21 ... Here's my controller @ post.js 16 $scope.sendComment = function () { 17 var newComment = { 18 user: $scope.currentUser, 19 text: $scope.currentText 20 21 }; 22 var promise = CommentService.add(newComment); 23 promise.then(function(name) {

How to send email with all information associated with user id in Firebase

对着背影说爱祢 提交于 2019-12-08 03:28:16
问题 When a new user is added to Firebase, I would like to send myself an email with all of the data associated with that user. So if I have a /contacts path and a /projects path, I'd like to include the data from both paths when a child is added to the /contacts path. I've looked at Zapier using Mailgun, but can't figure out how to accomplish this. If Zapier won't work, is this something can be accomplished with the firebase-util? Tree for my-firebase-app.firebaseio.com/contacts -contacts -

$firebaseSimpleLogin and session without re-login

那年仲夏 提交于 2019-12-08 02:09:58
问题 I am using $firebaseSimpleLogin to log into Firebase using email/password. It is working rather well when I log in using email/password, I could see sessionkey being saved automatically as a cookie. However, would like to remember the log in such that user only have to log in once. So I included {rememberMe: true} during auth. How do I check if the session is still alive at the beginning of the page being loaded? 回答1: From your question, I assume you're using Angular JS. You can execute a run

AngularJS with AngularFire 0.5.0 - $remove item doesn't work

别来无恙 提交于 2019-12-08 01:59:23
问题 I just wanted to work more on my first little Angular project and I updated AngularFire from 0.3.0 to 0.5.0 and nothing really works anymore. I was able to get the database access back and also to add items to my list. But the remove function doesn't work anymore. Before I udpated AngularFire, I used splice(index,1) to remove an item. I also tried to use the new $remove from 0.5.0 but it just removes all items from the list, even I add a key. Thats my list repeat: <tr ng-repeat="(key, earning

Angularfire login with Facebook not recieving extended permissions

浪尽此生 提交于 2019-12-08 01:04:29
问题 I had this working perfectly before upgrading to angularfire 0.9 I want to request the user's email address from facebook . Facebook has already granted me permission to ask for this from my users. I am using the code below to login with facebook. It all works perfectly accept that it doesn't request the user's email. FYI: I am using the Angularfire-seed codebase loginWithFacebook: function() { return auth.$authWithOAuthPopup("facebook", function(error, authData) { /* Your Code */ }, {

How to extend returned objects in the list returned by $asArray?

时光毁灭记忆、已成空白 提交于 2019-12-07 19:57:25
问题 I'm having trouble decorate the objects in my list returned by $asArray in angularfire with a new method (not decorating the array itself). The angularfire documentation seems to suggest that the right way to do this is to override the $$added method in the factory for $FirebaseArray, returning a new object that either encapsulates or extends the snapshot that gets passed in to that method. From the documentation: // an object to return in our JokeFactory app.factory("Joke", function(

Using Limits with AngularFire

痴心易碎 提交于 2019-12-07 18:16:14
问题 This is the code I have right now: var url = 'https://*****.firebaseio.com/photos'; var promise = angularFire(url, $scope, 'photos', {}); promise.then(function() { //limit here. }); What code can I insert to limit what is returned from the firebase to only those have a specified priority (let's say the priority is "new)? Thanks for the help. 回答1: Just pass in an already limited query to angularFire, like so: var ref = new Firebase("https://*****.firebaseio.com/photos"); var promise =

angularfire 2: Error “Unhandled Promise rejection: TypeError: Cannot read property”

心不动则不痛 提交于 2019-12-07 13:03:02
问题 I tried an example app to connect to Firebase In my Main.ts I wrote this: import { bootstrap } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; import { AppComponent, environment } from './app/'; import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods } from 'angularfire2'; if (environment.production) { enableProdMode(); } bootstrap(AppComponent,[ FIREBASE_PROVIDERS, defaultFirebase({ apiKey: "MYKEY", authDomain:

How to insert object into Firebase Forge? - AngularFire 0.8.0 - Thinkster - Chapter 7

喜欢而已 提交于 2019-12-07 07:58:45
问题 I am following the Thinkster Ang-News tutorial with the latest version of AngularFire (0.8.0) installed. I've managed to get to part 7 of the tutorial successfully but I am stuck on the part where I need to insert a user object into the Firebase Forge. The code works as follows: When a new user registers via my HTML form, the "register" function is called and "User.create(authUser, $scope.user.username);" is executed within the "register" function. // login and registration page app

Property 'filter' does not exist on type 'FirebaseListObservable'

谁说我不能喝 提交于 2019-12-07 07:23:40
问题 I am using Ionic 2 and Firebase to build a chat app. I add the following which is supposed to be used to add a filter: import 'rxjs/add/operator/filter'; ... public af: AngularFire ... this.firelist = this.af.database.list('/chat/', { query: { orderByChild: 'negativtimestamp' } }).filter(item => item.memberIds === 'xxx'); However, I get the following: [ts] Property 'filter' does not exist on type 'FirebaseListObservable'. ps. this.af.database.list(...) returns a FirebaseListObservable<any[]>