随笔分类 - Firebase
摘要:Anroid Firebase Project setup: 1. In firebase console, cerate a Android app setup you can find in code: Find "applicationId", undef "defaultConfig", p
阅读全文
摘要:AuthService: Guard:
阅读全文
摘要:import {Injectable} from '@angular/core'; import {Skill} from '../models/skills'; import {AuthService} from '../../auth/services/auth.service'; import 'rxjs/add/operator/do'; import 'rxjs/add/operat...
阅读全文
摘要:The upload class will be used in the service layer. Notice it has a constructor for file attribute, which has a type of File. This will allows us to i
阅读全文
摘要:Updated to AngularFire2 v5.0. One important change is that you need to call .snapshotChanges() or .valueChanges() to get data as Observable back. The
阅读全文
摘要:Firebase cloud functions is similar to AWS lambda or serverless. You can deploy you code which wrote in Node.js and deploy to firebase. It can respons
阅读全文
摘要:A simple store implemenet: Using this store in AuthService: Using Reactive approach in app.component.ts:
阅读全文
摘要:Config AngularFire, we need database and auth module from firebase. For the SharedModule: We use forRoot method to register our AuthSerivce, so there
阅读全文
摘要:Automate all the things!! Automation is crucial for increasing the quality and productivity. In this lesson we will learn how to automate the deployme
阅读全文
摘要:In this lesson we are going to learn how to build a custom Node process for batch processing of Firebase data using the Firebase queue library. From U
阅读全文
摘要:We cannot allow un-auth user to change the database data as they want, for Firebase, it is easy just need to overwirte the rules: Here we set "write"
阅读全文
摘要:import {AuthProviders, FirebaseAuthState, FirebaseAuth, AuthMethods} from "angularfire2";import {Injectable} from "@angular/core";import {Subject, BehaviorSubject} from "rxjs";import {AuthInfo} from ...
阅读全文
摘要:After successfully login, we want something help to check whether user has already login or not. And we will use Observable to do that. Create AuthInf
阅读全文
摘要:First, you need to enable the email auth in Firebase console. Then implement the auth service: Because login method return Promise, we need to convert
阅读全文
摘要:At some point, you might need to udpate multi collections and those collections should all updated successfully, otherwise we don't update anything. Y
阅读全文
摘要:To do auth, first you need to go firebase.console.com to enable the auth methods, for example, enable google, github... Enable goolge is quite simple,
阅读全文
摘要:Let's see how to do pagination in Firebase: For the init loading, we only want 3 items: 'limitToFirst' --> If not given 'startAt', will start from ind
阅读全文
摘要:Lets see how to query Firebase. First thing, when we do query, 'index' will always help, for both SQL and NoSQL. In Firebase, we can also set index on
阅读全文
摘要:import { Injectable } from '@angular/core'; import {RealtimeService} from "../shared"; import {FirebaseListObservable} from "angularfire2"; @Injectable() export class CourseService { courses$: Fi...
阅读全文