In order to be
able to read the database in Firebase for easy access during the development
phase, you must set the rules .read to
true
Access is for
development purposes only !
Settings in
Firebase to make it easy to read the data in Angular
{
"rules": {
".read": true,
".write": false
}
}
|
With authentication
It works even
if you enable authentication, Provider: Anonymus
Example of
tasks as a real-time database
In the
path:
https://dailycheck-d9983-default-rtdb.europe-west1.firebasedatabase.app/
The data
as a structure see above
dailycheck-d9983-default-rtdb
Tasks
1:
"Enter order"
2: "Fill
order"
3: "Send
order"
4:
"Confirm order"
In Angular
you can pick up the data as here:
*
public aufgaben: Observable<any>[];
//--< Daten von Firebase holen >--
constructor(afDb:AngularFireDatabase) {
//*works
const itemsRef: AngularFireList<any> = afDb.list('Aufgaben');
itemsRef.valueChanges().subscribe(
x=>{ this.aufgaben = x;}
);
}
//--</ Daten von Firebase holen >--
|
Status:
AngularFire Version 5 Firebase Version 7
"angularfire2": "^5.4.2",
"firebase": "^7.24.0",
"rxjs": "~6.6.0",
|