4Manuals

  • PDF Cloud HOME

秋田服务中哪种方法更适合Firebase身份验证? Download

    如何将动态模板引用Click事件绑定到跨度? Jspdf在最新的Chrome版本中保存时间过长(79.0.3945.88) Ionic 3错误:“缺少文件google-services.json。没有它,Google Services插件将无法运行。”在离子科尔多瓦建立/准备Android Flutter:Java使用或覆盖已弃用的API 从Firebase发送推送通知不起作用 IIS 10中的网址重写 Angular 7:类型为radio的复选框,使用ngModel还是change-function? 为什么Qr代码没有使用HTML元素下载 如何使用ngx-pagination显示特定页面中存在的记录数 清单提取失败,返回状态404

我有一个宠物项目,使用Angular2-Akita-Firebase实施。 秋田服务中firebase auth的哪种实现更好?

import { FirebaseApp } from '@angular/fire';
private auth = this.app.auth();

或

import * as firebase from 'firebase';
private auth2 = firebase.auth();

代码:

import { Injectable } from '@angular/core';
import { UserStore } from './user.store';
import { CollectionConfig } from 'akita-ng-fire';
import { AngularFirestore } from '@angular/fire/firestore';
import { FirebaseApp } from '@angular/fire';
import * as firebase from 'firebase';

@Injectable({ providedIn: 'root' })
@CollectionConfig({ path: 'users' })
export class UserService {
  constructor(
    private store: UserStore,
    private db: AngularFirestore,
    private app: FirebaseApp
  ) {
  }
  private collection = this.db.collection('users');
  private auth = this.app.auth();
  private auth2 = firebase.auth();

  login(user: User) {
     this.auth.signInWithEmailAndPassword(user.email, user.password);   }
}

0 个答案:

没有答案



Similar searches
    语法ique.tab.c:对yylex的未定义引用 写入缓冲区溢出时,除seg错误外没有其他有用的输出 权限被拒绝使用GlusterFS在集群上创建Jenkins Samsung RT34MB Refrigerator User Manual Java:无法了解循环行为