Setup firebase account for angular application
Here we see how we can setup firebase account to use firebase function for real time database or storage or any various operation for web development.
Firebase
Introduction
Firebase gives you the tools to develop high-quality apps, grow your user base, and earn more money. We cover the essentials so you can monetize your business and focus on your users.
Setup Firebase Account
Go to Firebase website and login using your email id, when you see given below screen click on Add Project section.
Enter your project name, accept the terms and condition and click on Create project button.
Click on your project then you?ll enter in your Firebase dashboard.
Navigate to Develop > Authentication > Web setup
then click on the Web setup button, and a popup will appear along with your firebase credentials.
Copy these Firebase credentials, you will have to paste these credentials in your src/environments/enviorment.ts
file to make the connection between Firebase and your Angular app.
Setup Firebase Database
Create Database for Student Records Angular App
Firebase offers Real-time Database and Cloud Firestore, for this tutorial we are going to use Real-time Database.
Click on create database button.
For the demo purpose we will be using Start in test mode security rules option and click on enable button.
After that, we will see the database screen click on Cloud Firestore button and select Realtime Database option.
Select Realtime Database from the options like given below.
Don't forget to change your Firebase database rules, go to Database > Rules
. Otherwise, you won't be able to access the data without authentication. Paste these security rules in your Realtime Database Rules tab.
{
"rules": {
".read": true,
".write": true
}
}
Note: Don't forget to change these rules when you are building a real app for your clients.
If you want to use firebase in angular 4+ please follow this article.