Getting query params at constructor vs ngOnInit

Hello everyone,

I am confused when I saw someone gets query params at Constructor instead of ngOnInit as the videos of Mosh showing. My question is which one is the correct one to get query params? Why getting params at constructor is still working as well as getting params at ngOnInit? The code I saw is similar below:
constructor(private route: ActivatedRoute) {
.subscribe(params => {
if (params[‘memberid’]) {