草庐IT

firebase-measurement-connector-im

全部标签

javascript - 使用 ControllerAs 语法的 Firebase 3 向数据绑定(bind)

我正在尝试使用firebase和angularfire进行三向数据绑定(bind)。你可以看到我在Plunker中得到了什么:http://plnkr.co/edit/RGA4jZK3Y6n4RkPCHK37app.js:angular.module('ideaBattle',["firebase"]);服务:angular.module('ideaBattle').constant('FBURL','https://ideabattle.firebaseio.com/').service('Ref',['FBURL',Firebase]).factory('dataBank',fun

javascript - Firebase 检测用户是否存在

如何通过ReactNative检查Signup按钮中的Firebase身份验证中是否存在用户?这是我的登录页面代码:exportdefaultclassLoginextendsComponent{constructor(props){super(props)this.state={email:'',password:'',response:''}this.signUp=this.signUp.bind(this)this.login=this.login.bind(this)}asyncsignUp(){try{awaitfirebase.auth().createUserWithEm

javascript - 使用 Redux-Saga 的 Firebase 身份验证不起作用

我正在尝试使用firebase身份验证创建一个新用户。我正在使用redux-saga进行上述调用。下面是我的saga.js:import{takeLatest,put}from'redux-saga/effects';import{SIGN_UP,AUTHENTICATION_FAILED,SIGN_UP_SUCCESS}from'../actions/index';importfirebasefrom'firebase';function*signUp(action){console.log("abouttocallauthentication");//Thisbeingprinte

javascript - Firebase Web Auth 在移动设备上不起作用?

我打算为我的网络应用程序使用Firebase的提供商身份验证,但它似乎不适用于移动设备。该网站在这里:https://cypher.city然后当你点击这个按钮时:将出现一个弹出窗口。当你点击这个按钮时:然后它应该进入谷歌提供商身份验证流程。我的代码如下所示:varprovider=newfirebase.auth.GoogleAuthProvider();firebase.auth().signInWithRedirect(provider).then((result)=>{//console.log('@$signinwihtgoogleworked!'+e+',useris:'+

javascript - 将 base64 编码的图像保存到 Firebase 存储

使用firebase3.0.x,是否可以将base64编码的图像保存到新的Firebase存储服务?我在上传图像之前使用Canvas在浏览器中调整图像大小,并将它们输出为base64jpeg。我知道Storageapi可以接受Blob,但我当前的项目需要IE9支持。 最佳答案 无需将BASE64转blob,只需使用putString函数即可。firebase.storage().ref('/your/path/here').child('file_name').putString(your_base64_image,‘base64’

javascript - 如何在 Cloud Functions for Firebase 中访问多个实时数据库实例

我在一个Firebase项目中使用多个数据库。主(默认)数据库的云函数工作得很好,但是,我不能让它们为辅助数据库工作。例如,我想在具有管理员权限的节点上发出读取请求://thisworksadmin.database().ref(nodePath).once('value')...这在主数据库中有效,但是,如果我想在另一个数据库上执行命令,它就不起作用了://thisdoesn'tworkadmin.database(secondaryDatabaseUrl).ref(nodePath).once('value')...虽然部署了功能,但在尝试执行云功能时,控制台出现错误。这是带有ht

javascript - 如何从 Firebase 获取服务器时间

我在使用angularjs和firebase时使用$scope.createdDate=newDate();它使用客户端上的时间,但我想使用Firebase服务器的当前时间,因为客户端时间可能会有所不同。我怎样才能有Angular地解决这个问题? 最佳答案 当你打印firebase.database.ServerValue.TIMESTAMP时,它会给你这个对象{.sv:"timestamp"}要在客户端上获取firebase服务器的时间戳,您首先需要将值写入到服务器,然后读取该值。firebase.database().ref('

javascript - 在 Firebase 查询中组合 orderByChild 和 equalTo

给定以下数据结构:{"comments":{"-JcBbk64Gpm1SKoFHv8b":{"content":"blah","createdAt":1417550954985,"link":"http%3A%2F%2Flocalhost%3A3000%2F","recommendedCount":0,"replies":{"-JcBbk8gF_nQ_vjwag61":true},"replyCount":1},"-JcBbk8gF_nQ_vjwag61":{"content":"blahblah","createdAt":1417550955151,"link":"http%3A%2

javascript - 如何在注销时注销 FCM 设备 token 和服务 worker 以及如何重新初始化 Firebase 应用程序?

我正在尝试实现Firebase云消息传递(FCM),以便将通知推送到我的Web应用程序(AngularJS)中。为此,我在根应用程序文件夹中创建了一个firebase-messaging-sw.js。//firebase-messaging-sw.js'usestrict';console.log('Startingserviceworker');if('function'===typeofimportScripts){importScripts('https://www.gstatic.com/firebasejs/3.5.0/firebase-app.js');importScri

javascript - 如何在 Firestore 文档中保存对 Firebase Auth 用户的引用?

所以我有一个应用程序,您可以在其中注册和登录。我使用FirebaseAuth做到了这一点。然后我有一个Firestore,其中有多个集合,例如“请求”和“要约”。我的应用程序中的Firebase授权用户可以创建新的请求,我是这样添加的:firestore.collection('requests').add({category:'Test',customer_id:this.props.appState.user.uid,//TheuidfromFirebaseAuthlink:this.state.productLink}).then(docRef=>{console.log('Su