Before concluding this module one more thing related to our hooks here we learned about at view child
which we can use year in the cockpit to get access to elements from our wall dorm from our template.
Let's do the same here and the server element component team of the fall where we have all these lifecycle
hooks.
Let's say I'm one to get access to this heading so I'll simply place a local reference name heading
on it.
Therefore I'll add a new At view child property.
Make sure to import view child from angular core.
And with that at all stored is in the header property which is of type element ref as we learned which
also needs to be imported from angular core.
And I want to select the heading local reference with a just placed on the last day of year.
So after we got access to it and now we would expect that we can't use this before we reached after
due in it.
So let's try it in NZ on it.
Let me actually console log this
header and there is a native element.
And now let's Exel something which is definitely available on a div and that is the text content.
If we do it as and I saved this let's view the console.
If I reload the application here you see this empty line here.
This is where I would expect the text content can make this even clearer by outputting text content.
And then while rendering the text content of the word any There is no text content in here as you can
see an empty space.
If I copy the exact same code and place it as an after view in it here.
So offered the view should have initialized.
Now you will see that here when it is called the second time after viewing it we see a test server.
So that is the difference between wild points of time where it is Hooke's run after viewing it gives
you access to the template elements.
You can then access them and use their values and so on.
Before does hook has been reached.
You can't do that.
You can't check the value of some element in your dorm because it hasn't been rendered yet.