Тёмный

Episode 8 | Angular Change Detection Strategy 

Saikat's Tutorial
Подписаться 3 тыс.
Просмотров 42 тыс.
50% 1

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.

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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.
@TheUltimateTrainJourney
@TheUltimateTrainJourney 4 года назад
This video answers many other questions and also encouraged us to read more about interesting js questions
@nadeemkh100
@nadeemkh100 5 лет назад
Thank you Man, Perfect than many articles.
@ragucool9468
@ragucool9468 2 года назад
How to make reusable component in angular ? Kindly make video bro.... thanks advance . Videos simply super
@ashishnayak2666
@ashishnayak2666 Год назад
Clear explanation ty bro...
@MrHesamuddin
@MrHesamuddin 4 года назад
Thank you so much, please keep making such video.
@nirajtathe2172
@nirajtathe2172 4 года назад
Thanks for the explanation. It is easy to understand.
@soumyajeetbai
@soumyajeetbai 2 года назад
thanks bro for your valuable examples. 🙏
@sourishdutta9600
@sourishdutta9600 5 лет назад
Keep the good Work. You are an amazing man.
@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…
@TheOwlWhoKnows56111
@TheOwlWhoKnows56111 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.
@chandukanth6875
@chandukanth6875 2 года назад
But splice will change the string? Is that means it is changed? Mutable?
@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 5 лет назад
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.
@hemantgajbe8500
@hemantgajbe8500 4 года назад
Thanks very nicely explained
@vinodnkr6992
@vinodnkr6992 2 года назад
How about when dealing with strings then? Consider passing a string , seems this concept wont work with immutable.. isn't it ?
@kalankasiyambalapitiya7615
@kalankasiyambalapitiya7615 4 года назад
Good explanation , thanks and keep up the good work !!!!!
@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!
@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.
@nanasarathi
@nanasarathi 5 лет назад
Thanks... It was really nice
@patelhetal2232
@patelhetal2232 4 года назад
Good Video.Thank you.
@sampetroda1373
@sampetroda1373 4 года назад
Thanks. it is a good article
@anantshekhar698
@anantshekhar698 3 года назад
this change detection strategy works upon @Input properties only or normal properties also??
@hemeshjaiswani6654
@hemeshjaiswani6654 5 лет назад
nicely cleared
@sankarprasadpanda9431
@sankarprasadpanda9431 6 лет назад
Loved it!! Learnt something..Subscribed :)
@SaikatsTutorial
@SaikatsTutorial 6 лет назад
Thanks
@DevendraKumar-hw9rg
@DevendraKumar-hw9rg 4 года назад
U can change string with splice
@TheUltimateTrainJourney
@TheUltimateTrainJourney 4 года назад
Yesterday in interview asked this question but I didn't know this
@vothuong08
@vothuong08 5 лет назад
it"s nice
@julianalvarez9810
@julianalvarez9810 4 года назад
starts at 3:41
@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.
@gonzalosurribassayago4116
@gonzalosurribassayago4116 6 лет назад
Hello send me the link code thanks
@SaikatsTutorial
@SaikatsTutorial 6 лет назад
github.com/mysupermate/demoApp
Далее
Episode 9 | Content Projection using Angular
10:49
Просмотров 17 тыс.
Change Detection Strategy in Angular
23:17
Просмотров 48 тыс.
🦊🔥
00:16
Просмотров 584 тыс.
Episode 12 | Angular @ViewChild and @ViewChildren
16:10
JavaScript Pro Tips - Code This, NOT That
12:37
Просмотров 2,5 млн
DHH discusses SQLite (and Stoicism)
54:00
Просмотров 80 тыс.