angularfire

Firebase AngularFire Facebook Login no login transports available error

我们两清 提交于 2019-12-13 21:32:35
问题 I'm currently using Firebase's AngularFire and trying to login with some code I found in their documentation for facebook logins. This is my html code (with ng-click to start login): <a ng-click="loginWithFacebook()" class="btn btn-block btn-social btn-facebook"> This is what my angularjs code looks like (I've set up a login controller): var app = angular.module("loginApp", ["firebase"]); app.controller("loginCtrl", function($scope, $firebaseObject) { var ref = new Firebase("firebaseUrl");

Combine $FirebaseObject and multi location updates

你。 提交于 2019-12-13 11:19:12
问题 Is there a way to do a multi-location update when using a $FirebaseObject? When i try it like this i get an error "Firebase.update failed: First argument contains an invalid key ($id) in property" var customerData = {}; customerData["Customers/" + user.uid] = firebaseObject; customerData["ProjectOverview/" + user.uid] = "value"; ref.update(customerData); I could use the solution in this SO question but that doesn't seem like the best way to do this. Is there a better way to do multi-location

Using .numChildren() in AngularFire

末鹿安然 提交于 2019-12-13 08:59:49
问题 I'm trying to use .numChildren() in AngularFire, but not sure I'm doing it correctly. function getServiceProviders(serviceId) { var serviceProviders = ref.child('services').child(serviceId).child('providers'); return serviceProviders.numChildren(); } I'm getting the following error: TypeError: e.numChildren is not a function Not sure if this is due to me using Browserify, or I'm just trying to access numChildren incorrectly. Any help is appreciated. Thanks in advance! 回答1: Your code snippet

How to optimise data retrieval and inter-controller data sharing with AngularFire automatic binding?

笑着哭i 提交于 2019-12-13 07:41:29
问题 Say I have a list view+controller that displays a list of item names and a detail view+controller thats shows detail for an item. How would I use angularfire (preferably with automatic three way binding) in a way that does not fetch the same data twice? Because controller#1 would have already fetched the items AND their details when the (itemsListRef).$bind($scope, 'items'); statement executes. In controller#2, (itemDetailRef,).$bind($scope, 'itemDetail') would then fetch item detail data

Live, realtime 3 ways data-binding date-time input on AngularFire

守給你的承諾、 提交于 2019-12-13 07:15:12
问题 I have the following simplified version of my code: tr(ng-repeat='entry in ds3.entries | orderBy:orderByField:reverseSort | filter:query as results') td input.screen(type='datetime-local', ng-model='entry.date_received', datetime="MM/dd/yyyy hh:mm a" ) span(ng-hide='') {{entry.date_received | dateFormat }} tr.screen td input.screen(type='datetime-local', ng-model='new_entry.date_received', datetime="MM/dd/yyyy hh:mm a", date-parser="MM/dd/yyyy hh:mm a") td button.btn-xs.btn-success(ng-click=

AngularFire - Removing an object from an array, with a twist

我的梦境 提交于 2019-12-13 05:17:31
问题 I have modified the AngularFire chat demo quite a bit. I am stuck at this point. I have created an array on Firebase of users when they log in, like so... var url2 = 'https://<yoursite>.firebaseio.com/users'; $scope.$on("angularFireAuth:login", function(){ $scope.loggedIn.add({newUser: $scope.user.username}); }); $scope.loggedIn = angularFireCollection(new Firebase(url2).limit(50)); and for the html... <ul> <li ng-repeat="x in loggedIn | unique:'newUser' ">{{x.newUser }}</li> </ul> Since each

Upgrading AngularFire causes scripts to stop working?

好久不见. 提交于 2019-12-13 05:17:26
问题 The following script is a simple read from firebase using angularfire, firebase, and angular. The issue is that when I upgrade AngularFire from 0.7.1 to .0.8.0 the script completely stops working and I'm not sure what I'm doing wrong? <body> <section ng-app="myapp" ng-controller="MyController"> <div ng-repeat="item in data"> <h3 ng-cloak>{{item.title}}</h3> </div> </section> <script> angular.module("myapp", ["firebase"]) .factory("FirebaseService", ["$firebase", function ($firebase) { var

How to filter out a user using ng-repeat within firebase and angularfire?

风流意气都作罢 提交于 2019-12-13 05:15:36
问题 The below code pulls an array from firebase using ng-repeat and filters for the userId. The issue is that when I use "!" it does not filter out the user, but instead nothing shows up. In other words when I replace the below ng-repeat filter: ng-repeat="(id,item) in ideas| filter:user.google.id" with this ng-repeat filter, with the intention of filtering out the user, it no longer works. ng-repeat="(id,item) in ideas| filter:user.google.id" How can I filter out list for any item that contains

Firebase Date storage goes wrong

房东的猫 提交于 2019-12-13 05:14:41
问题 So I am trying to store a date in Firebase like this: var fb = new Firebase(FIREBASE_URL); var syncData = $firebase(fb); var date = new Date(2014, 0, 1); console.log(date); syncData.$child('date').$set(date); var dateInFirebase = syncData.$child('date'); dateInFirebase.$on('loaded', function(){ console.log(dateInFirebase.$value); }); The first date correctly logs 'Wed Jan 01 2014 00:00:00 GMT+0100 (CET)', however the second log is this: '2013-12-31T23:00:00.000Z' which is 1 day before that,

ng-repeat stuck in infinite loop angularfire 8.2

孤街浪徒 提交于 2019-12-13 04:43:06
问题 I'd like to figure out why this ng-repeat statement runs infinite. Item.members has a length of 2 and contains userIds = true <script type="text/ng-template" id="items_renderer.html"> <label> <span class="team-description" ng-show="!item.editing">{{item.name}}</span> <label ng-repeat="memberId in item.members"> <span>{{ getMember(memberId) }}</span> </label> </label> </script> <div ui-tree="options" class="teamlist"> <ol ui-tree-nodes ng-model="teams" class="panel-teams"> <li ui-tree-node ui