The change detection strategy and Bush have a completely different approach, if you use it in a component,
this component will ignore the dirty tricks cycle and allows the reference of any of the component input
changes or there's a change on the internal state.
So back to a components graph.
If Taimur is using the Bush strategy when it detects an internal state change, then it fires the terms
of dextran strategy for this component.
And in this case, Angela will find out which brands this company belongs and then brands the dirty
tech cycle, but only on this brand.
Another situation to consider when using the ambush detection strategy are the external changes when
a component is following this strategy, have an input and is input changes in a mutable way without
modifying the reference to the object, then this change will be ignored.
The ambush detection strategy is designed to be much more optimized, so to detect changes on the inputs,
it needs them to be mutable because taking those gears is a lot more efficient.
So when my multiple input changes, then it also fires the.
Did the check on this, Brent.
But let me explain you briefly, what's the difference between a multiple and multiple objects?
Well, we can see objects as a reference to memory.
So I this variable object, one that is an object with several properties boolean set to throw, then
the variable object.
One, this is the finding a position on the memory and then this position of memory is what all the
content of this object is, a store and whatever object allows it to fully modify its content like changing
properties.
Five to fault's.
To take this chance, I will have to check all the properties of this object to find out which one I've
changed.
That's why this strategy is not really efficient.
Let's see now.
Emoto objects in multiple objects cannot be modified internally.
To make changes, you have to create a brand new object.
So I want to find this property from the falls.
What I have to do is to create a new object one.
But when you create any object, in fact, your variable is referencing a different space of memory.
So this way, in order to detect tendons, I will only have to check if the reference of the object
have tensed or not.
That's what I did.
To check with multiple objects is more performant because they only have to compare the reference to
the object and not all of its properties.
OK, so to optimize my application and prevent unnecessary calls to my progress geto I'm want to change
the text and strategy of the time, a component to ambush in time, a component to as inside the metadata
I the action and I sat at the chance detection strategy on Bush.
I have to import this object, change the text and strategy from angular core and then if I go to see
the results, I can see Laslett in progress here.
But also when I click play, I don't see any more looks.
Neither interface changes until the countdown ends.
Well, if I told you about the 10 detection strategy on Bush, well, that my component is not going
to take it's a state unless it receives an event like the button click or that the input reference changes.
And this is not the case.
But don't worry, there's a solution for situations where the change is produced inside the component
instead of of type.
You can tell by hand to the transportation system that it has to run again.
This is along with the service that like the ref that I'm going to inject here, my dependency injection.
So I go to the constructor and grab private, say, rev of type change detector ref.
And of course, I also have to import this change detector ref, as you can see here from agrichar.
And this detector ref is a service that allows me to tell and in which moment you have to detect changes.
In this case, when I receive new information from my absorbable here, I'm changing the content.
So here's where I want to detect those changes.
So here I use my terms like the ref to make sure.
And I will take this component.
I use the MicroTech method, so I save my code and go to the browser.
And then when I click play, you can see that everything is updating perfectly.
But now we are only logging those access to the progress geto of the time that is working.
My old timers don't have called this progress getta because they have not been aware of those changes.
The only company that has been aware of those changes is the timer that I'm manipulating in a simple
situation like this where they're not human events.
This is not the game changer.
However, if you have a complex application with a lot of components, a lot of dependencies and interactions
and a lot of findings, then using things, the picture on push instead of the fold, one can help you
prevent useless checks and optimize the performance of the application.