The beautiful, the creator like content child, but four elements that are not included using and content,
but simply belongs to the parent component.
We can compare it with a template reference Bible, but only on the typescript side to make you practice
with your child.
I'm going to use another company that you haven't seen yet, the simple ilet be accompanied.
So I opened the template.
As you can see, it's very similar to the energy we have created before.
But in this case there's no content projection.
But all the properties, title messages and the arcade well done by this method, all of them divided
into the component itself.
So if I open the typescript side of this component, I can see the properties message and title, as
well as the dismissed method and the show method.
So it is a component itself who controls its visibility.
OK, to playing with this at the component into the main BU app component, HDMI, Amitabh Sekiya,
the ELT view and all of the view.
And then below that I write up simple view and I open the TAPS website of the main component so it can
use the child in order to get this child element.
And in this first experiment, disconsolate, I have to create a property to create that with your child.
So I'd be a child of a simple Ullyot be a component.
This property is called alert and it will be of simple art, be a component, of course, anytime by
the news staff, the simpler it will.
And also the middle child, Accredo, see how I added them here, here, unlike with the child, there's
a life cycle event from which my real child becomes available.
It is the life cycle even after being in it.
So I tell my class I have a component to implement the interface.
I have to be in it.
And then, of course, they have to implement it, so I grabbed this method and I have to be in it.
Of course I have to import it also.
That's where I get the linta error.
You can see how I am reporting this after beginning from Glocke back to the method and you have to be
in it, what I will do here is to simply cancel like.
There's that alert, if I to the results, I can say there's an empty alert bill, but if you saw the
console output, you can see my component locked and it has been configured by the folder's miscible.
That's where you can see it.
However, I have nothing to tell as the title description values up on the simple component.
I can see how visible poverty is set to throw, but I need to win it.
The message and title properties.
So I have a stepfather and from the main component I will read those properties of maillot swimmy and
after being in it I had this that hour, the title.
Equals high.
And also the message this hour, that message equals hello, world failed to see the results.
Now you can see that I have the title on.
The message is expected.
However, I got a huge error on my console output so you can read the error.
It says expression change after it has been checked error.
So there has been a change of the expression after it has been checked before checking.
It was on the and after that it was a high error is caused because when you're using the development
server, the general election cycle is executed twice.
And in this case it detected that the value has changed between those two executions and they should
not happen when you run your cut in production, this error disappears because the transaction cycle
is executed only once.
But of course, no one wants to see this ever appearing in the Bellmon never.
In fact, I mean, the trick at the beginning because of the visible property would have been initialized
to false.
And then I would have called the show method in the after in it like this, this that that show.
I would have got the same error I sent the property through to prevent this to happen, because I want
explained first, in a way, the point is that if you want to modify your bill child at the beginning,
you should better use the lifecycle even after containing it.
That is when the content is injected to the view and the change detection is not being run yet.
So if I had this event to the after content in it here inside, I'm selling the title message.
I'm also calling the show method.
I can remove this console lock.
I have to replace, of course, the interface implemented by the content in it without the anti the
interfaces of the content in it and import it and I can remove the after B in it.
That is not the first.
Now as I'm calling our show at the beginning, I can go to the simple allow to be a component and say
that it won't be visible by default.
And if I go back to the results, you can see that now it works fine.
When I load the page, it goes the show method.
So it is displayed.
You can see also the title of messages added by code.
However, there's no error in the console output.
If I click OK, it closes because it goes to this miss method itself.
So let's summarize this video.
As you can see, I have this component simple our view with a couple inputs and its own methods.
And instead of using it in the main component and play it by defining the title a message input and
by creating a template reference variable in order to call the show Method of the Uloth, what I'm doing
is the same stuff but from TypeScript.
So I use create of your child in order to send to the property in the simple hour to be a component
in the template.
And then I use the lifecycle event and you have to containing it to directly use the out component API.
So I said the public properties title a message and also called the public method show.
As you can see, my ELIF component, both the title and message properties do not have any access modifier
and this is the same of making them public.
Also made this method is public and so is the show method.