Set up a simple Guard in Angular 12

Let’s say you want to add a Guard so that you force people to be logged in at certain pages or routes rather. I am using Angular 12 but you can do this is lower versions on Angular too! Let us create a folder called services if you haven’t one already, and in it create …

method ‘[]’ can’t be unconditionally invoked because the receiver can be ‘null’ with Firestore

If you are working with null safety in Dart and Flutter then I recommend checking this documentation out which explains various small fixes if you have problems working with null values and null safety. Usually you can just simply use the exclamation mark just before a property to check any other value if it also …