enter image description here
As constructor is a default function called by class, and NgOnInit is a default lifecycle hook called by angular component, so why we don't initialize class members in NgOnInit()?