Your actually wrong about #2 , the @ViewChild decorator takes second argument of type { static : boolean, read : TemplateRef | ViewContainerRef | ElementRef } when you have an static element let say div that doesn’t contain any dynamic code inside it ngif/nag-container etc... you can actually access your element even in the constructor if you set static to true, this was a hidden documentation but now its fixed
I’m an Italian web and mobile engineer. I have a passion for creating and enhancing anything technology related. When it comes to building, my ultimate goal is to make the world a better place.
Location
Chiasso, Switzerland
Education
DEGREE IN COMPUTER SCIENCE ENGINEERING
Work
Entrepreneur, Senior Front End Developer, Blogger, Speaker at Dreaming Lab Sagl
Your actually wrong about #2 , the @ViewChild decorator takes second argument of type { static : boolean, read : TemplateRef | ViewContainerRef | ElementRef } when you have an static element let say div that doesn’t contain any dynamic code inside it ngif/nag-container etc... you can actually access your element even in the constructor if you set static to true, this was a hidden documentation but now its fixed
You're right. I will update the article with that information.
Thanks :)