Angular Char project using Firebase and Bootstrap.
npm install
ng serve
In this project we used the AngularFire module, more precisely the AngularFireAuth for Authentication using Google login, and AngularFireDatabase for realtime database.
In the Angular implementation part, a big part of the logic is implemented in the imput of the message :
<input type="text" #inputMessage (keydown.enter)="sendMessage(inputMessage.value);inputMessage.value=''"
class="form-control form-control-lg chat-input" [disabled]="!(apiService.afAuth.user | async)"
[placeholder]="(apiService.afAuth.user | async) ? 'Enter your message ...': 'Please login using Google'">this input will be disabled if the user is not logged in, and also when he press enter he sends a message.
You can fork project from github. Pull requests are kindly accepted.
- npm install
- Run demo: ng serve / npm start