The Angular Material Doc Site passes {} to the Homepage route:
{path: '', component: HomePage, pathMatch: 'full', data: {}}
Just curious what the purpose of data: {} is?
After examining this closer I think that they do it so that they don't have to perform a null check using the Elvis operator in their templates.
In other words they don't have to do data?.property.
Only thing I can think of is that {} != null which means that you can determine the difference between whether this has been intentionally set to nothing ({}) or if a dev has forgotten to set the data for the route which would result in it being null (or undefined) I would need to check...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With