This project was generated with Angular CLI version 6.0.8.
That means you will have to install npm dependencies with npm i
after cloning this project.
Run ng serve -o
for a dev server. The app will automatically reload if you change any of the source files.
A sample project to use firebase in an Angular project WITHOUT AngularFire, the following basic operations are provided:
- Get
- Get (full node, iteration over list items)
- Set
- Push
- Transaction
-
Create a firebase project here
-
add/import the following JSON example to your realtime database:
{
"test" : {
"counters" : {
"button1" : 13
},
"tasks" : {
"id123" : "Ir de compras",
"id1234" : "Pasear al perro",
"idtest" : "Limpiar la cocina"
},
"users" : {
"userid1" : "Rodrigo",
"userid2" : "Carlos",
"userid3" : "Santiago",
"userid76" : "Pedro"
}
}
}
-
Add firebaseCredentials to your
/src/environments/environment.ts
file:environment.ts:
export const environment = { production: false, firebaseCredentials: { apiKey: 'your-api-key-here', authDomain: 'your-auth-domain-here', databaseURL: 'your-database-url-here', projectId: 'your-project-id-here', storageBucket: 'yout-storage-bucket-here', messagingSenderId: 'your-messaging-sender-id-here' } };