I just found out the optional parameters, and I fell into confusion.
Considering the two following examples:
[routerLink]="['/any-uri', {key: value}]"
[routerLink]="['/any-uri']" [queryParams]="[{key: value}]"
In what circumstances should I use optional parameters instead ofqueryParams
. Is there a rule/good practice?
I found several docs for the how, but none for the why/when.