Firebase permission-denied

前端 未结 4 1469
Happy的楠姐
Happy的楠姐 2021-02-20 08:59

I\'m a newbie in firebase.

How do I get through this below rule?

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 09:32

    You should check in your Angular NgModule and components if you are using "Realtime Database" or "Cloud Firestore". See diferences using "angularfire2":

    REALTIME DATABASE

    @NgModule({
    ...
    imports: [
        AngularFireDatabaseModule,
        ...
    ],
    providers: [
    AngularFireDatabase,
    ...
    ]
    })
    
    
    @Component({...})
    export class FirestoreComponent{
       constructor(private realtimeDb:AngularFireDatabase, ...) {
           this.locations = realtimeDb.list('locations').valueChanges();
         }
    ...
    }
    

    CLOUD FIRESTORE

    @NgModule({
        ...
        imports: [
           AngularFirestoreModule,
           ...
        ]
    })
    
    @Component({...})
    export class FirestoreComponent{
       constructor(private firestore:AngularFirestore, ...) {
           this.locations = firestore.collection('locations').valueChanges();
         }
    ...
    }
    

提交回复
热议问题