When using AngularFire to connect Angular with Firebase Realtime Database, how does AngularFire update the UI when data changes in Firebase?
Think about how AngularFire integrates with Angular's reactive programming model.
AngularFire uses observables to listen to Firebase data changes in real-time. When data changes, AngularFire emits new values, and Angular updates the UI automatically without manual refresh or polling.
Which of the following is the correct way to store Firebase configuration in an Angular environment file?
Firebase config is an object with specific keys, not a string.
The Firebase configuration must be an object with keys like apiKey, authDomain, projectId, etc. This allows AngularFire to initialize Firebase properly.
You want to build an Angular app with Firebase that securely restricts user data access. Which architecture approach is best?
Think about where data access control should happen for security.
Firebase Security Rules enforce data access on the server side, ensuring users can only read/write their own data. Firebase Authentication identifies users. Angular guards control UI routes but do not secure data access.
Which practice helps optimize performance when querying large Firebase collections in Angular?
Think about reducing data transferred and processed.
Using Firebase queries with limits and indexes reduces data transfer and speeds up app performance. Fetching entire collections wastes bandwidth and slows UI. Offline persistence improves performance by caching data.
If AngularFire attempts to read a Firebase Realtime Database path without read permission in Security Rules, what error will it receive?
Think about Firebase's response when access is denied.
Firebase returns a FirebaseError with message 'Missing or insufficient permissions' when security rules deny read access. Other errors relate to code bugs or network issues.