Giter VIP home page Giter VIP logo

144-firestore-group-chat's Introduction

Episode 144 - Firestore Group Chat

Let's Chat on the Live Demo

Build a realtime group chat app with Firestore.

Setup

git clone <repo> npm install

Add your crendentials to the Angular environment files, then replace configPlaceholder with environment.firebase in the app.module.ts

144-firestore-group-chat's People

Contributors

codediodeio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

144-firestore-group-chat's Issues

Share address doesn't work

The share address returns page 404 (even when the link is exactly the same as the one I have that the app is on).

Being on the chat page, then going to 'Google' or another source and then trying to go back (clicking back) returns error when landing on the exact same url.

Nobody else can join the chat. I believe this is due to language updates. Working on figuring it out.

this.auth.getUser() always return null

I am trying to use the code as a base for a similar app, however, I encounter an issue that when I use the AuthService from another Service class,

this.auth.getUser always return null

ClassRoomService class

  async create(title, text) {
    console.log(title, text);
    const user = await this.auth.getUser();

    if (user) {
      console.log(user);
      console.log(user.id);
    }
    else {
      console.log("user is null")
    }
}

I wonder what is wrong with the code, would you be kind to give me some advice ?

Forgot to mention, I add a new function for anonymousLogin in AuthService

  anonymousLogin() {

    return this.afAuth.auth.signInAnonymously()
          .then(() => console.log("successful login"))
          .catch(error => console.log(error));
  }

In component script

		this.authService.anonymousLogin().then(() => {
			 console.log("in anonymousLogin");
			this.classRoomService.create(this.act_title, this.act_text);  --> the "async create function"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.