Episode 8 | Angular Change Detection Strategy

  Рет қаралды 41,674

Saikat's Tutorial

Saikat's Tutorial

6 жыл бұрын

If you are building a large app then you must optimize code by implementing manual change detection process. This video shows how to use change detection strategy in Angular.

Пікірлер: 39
@lunadeluna69
@lunadeluna69 5 жыл бұрын
Thanks for awesome video. Love the concrete and easy to follow example.
@ritachoudhary8404
@ritachoudhary8404 2 жыл бұрын
Awesome video. best explanation for change detection strategy
@cw5948
@cw5948 5 жыл бұрын
I appreciate that you covered immutability. A lot of lessons on this subject don't discuss this, which is a problematic oversight.
@ashishnayak2666
@ashishnayak2666 Жыл бұрын
Clear explanation ty bro...
@TheUltimateTrainJourney
@TheUltimateTrainJourney 4 жыл бұрын
This video answers many other questions and also encouraged us to read more about interesting js questions
@darioribas3001
@darioribas3001 5 жыл бұрын
Hi, nice work! Do you know if there is a way I can detach change detector and centralize detectChanges into an event for a child component? I only got it calling detectChanges every place I needed it.
@orz5516
@orz5516 4 жыл бұрын
question - should i use onPush in every component in my app which has an @input? or only in components with long lists of component (that can hurt my performance) thanks!
@nadeemkh100
@nadeemkh100 5 жыл бұрын
Thank you Man, Perfect than many articles.
@soumyajeetbai
@soumyajeetbai 2 жыл бұрын
thanks bro for your valuable examples. 🙏
@sourishdutta9600
@sourishdutta9600 5 жыл бұрын
Keep the good Work. You are an amazing man.
@kalankasiyambalapitiya7615
@kalankasiyambalapitiya7615 4 жыл бұрын
Good explanation , thanks and keep up the good work !!!!!
@ragucool9468
@ragucool9468 2 жыл бұрын
How to make reusable component in angular ? Kindly make video bro.... thanks advance . Videos simply super
@nirajtathe2172
@nirajtathe2172 4 жыл бұрын
Thanks for the explanation. It is easy to understand.
@anantshekhar698
@anantshekhar698 3 жыл бұрын
this change detection strategy works upon @Input properties only or normal properties also??
@MrHesamuddin
@MrHesamuddin 4 жыл бұрын
Thank you so much, please keep making such video.
@chandukanth6875
@chandukanth6875 2 жыл бұрын
But splice will change the string? Is that means it is changed? Mutable?
@sanchessantos7153
@sanchessantos7153 Жыл бұрын
Thanks for video, I am Passing for one problem in my job. The data update only if I to click on the screen or to put one event click()… I am go to test this…
@nanasarathi
@nanasarathi 5 жыл бұрын
Thanks... It was really nice
@vinodnkr6992
@vinodnkr6992 2 жыл бұрын
How about when dealing with strings then? Consider passing a string , seems this concept wont work with immutable.. isn't it ?
@sankarprasadpanda9431
@sankarprasadpanda9431 6 жыл бұрын
Loved it!! Learnt something..Subscribed :)
@SaikatsTutorial
@SaikatsTutorial 6 жыл бұрын
Thanks
@SandeepKumar-ix2gt
@SandeepKumar-ix2gt 5 жыл бұрын
Thanks Saikat. This video help me a lots to understand change detection methodology but i have two questions in my mind: 1).changeDetectionStrategy.onpush will only work when reference of object changed then What does the difference make mutable or immutable objects. 2). Why should we use detect or detach method of changeDectorRef ? changeDetectionStrategy.onpush will work as same, in your video if we want to detach changes then we can use changeDetectionStrategy.default and if want to detect than we can use changeDetectionStrategy.onpush . Can you please help to understand we should use changeDectorRef.
@Gijera
@Gijera 4 жыл бұрын
For #1 a mutable object is one where its state can be changed and still point to the same reference, while an immutable is an object which cannot change its state. To 'change' it, It requires you to create a whole new object with the changes and reassign it back. Mutable means 'capable of change', while 'immutable' means 'not susceptible to change'. You can think of this 'clone and reassign' process for immutable objects as a sort of 'push'. Hence 'changeDetectionStrategy.onpush'. For #2 I believe the changeDetectorRef allows fine grained control of when these 'change processing' features happen within your code.
@patelhetal2232
@patelhetal2232 4 жыл бұрын
Good Video.Thank you.
@balinthaui6080
@balinthaui6080 4 жыл бұрын
The slice function returns with a new string and does not modify the original one. So if you do not save the result of the slice operation in a new var, then the result is lost. The reason you see "example" after the slice is because you are printing the original one, you did not save the result in a new var. Although strings are indeed inmutable, this is not a good reasoning.
@SaikatsTutorial
@SaikatsTutorial 4 жыл бұрын
Thanks for commenting. Here I was trying to show, no string method operates on actual string being immutable, rather it returns a new string.
@hemantgajbe8500
@hemantgajbe8500 4 жыл бұрын
Thanks very nicely explained
@sampetroda1373
@sampetroda1373 4 жыл бұрын
Thanks. it is a good article
@hemeshjaiswani6654
@hemeshjaiswani6654 5 жыл бұрын
nicely cleared
@vothuong08
@vothuong08 5 жыл бұрын
it"s nice
@TheUltimateTrainJourney
@TheUltimateTrainJourney 4 жыл бұрын
Yesterday in interview asked this question but I didn't know this
@DevendraKumar-hw9rg
@DevendraKumar-hw9rg 4 жыл бұрын
U can change string with splice
@gonzalosurribassayago4116
@gonzalosurribassayago4116 5 жыл бұрын
Hello send me the link code thanks
@SaikatsTutorial
@SaikatsTutorial 5 жыл бұрын
github.com/mysupermate/demoApp
@sanjayidpuganti8367
@sanjayidpuganti8367 6 жыл бұрын
Splice changes the string in place 1:46
@SaikatsTutorial
@SaikatsTutorial 6 жыл бұрын
splice is Array function
@sanjayidpuganti8367
@sanjayidpuganti8367 6 жыл бұрын
Saikat's Tutorial sorry my bad
@mayankvora8116
@mayankvora8116 4 жыл бұрын
strings are mutable, use splice.
@julianalvarez9810
@julianalvarez9810 4 жыл бұрын
starts at 3:41
Episode 9 | Content Projection using Angular
10:49
Saikat's Tutorial
Рет қаралды 17 М.
Episode 12 | Angular @ViewChild and @ViewChildren
16:10
Saikat's Tutorial
Рет қаралды 67 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 24 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 69 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 38 МЛН
Change Detection, Immutability, OnPush Strategy in Angular (Tutorial)
16:54
TheAngularCoder || Gourav
Рет қаралды 8 М.
Change Detection in Angular Pt.3 - OnPush Change Detection Strategy
16:53
Change Detection Strategy in Angular
23:17
Fun Of Heuristic
Рет қаралды 47 М.
💥 Angular OnPush Change Detection -  How Does it Work?
10:45
Angular University
Рет қаралды 51 М.
Angular change detection explained in 5 minutes
6:06
Simplified Courses
Рет қаралды 13 М.
Top 10 RxJs Operators in Angular [Angular Series]
25:06
David Acosta
Рет қаралды 119 М.
Episode 15 | Protecting Angular Route with Guards
17:22
Saikat's Tutorial
Рет қаралды 11 М.
Episode 14 | Observable in Angular
14:27
Saikat's Tutorial
Рет қаралды 26 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 24 МЛН