Zone.js and NgZone in Angular | Run your code outside Angular

  Рет қаралды 24,617

Fun Of Heuristic

Fun Of Heuristic

Күн бұрын

Zone.js is responsible for the change detection in angular, angular has NgZone service which helps angular to automatically run the change detection when any sync or async function is executed or when there is no microTask scheduled. So for every API call or any async task, angular is running the change detection. to avoid that we have a method call runOutsideAngular which will run outside of zone.js so it will not affect the change detection, and this can increase the application performance a lot, that's the reason ngZone is used for performance optimization in angular.
Zone.js handles all async calls like setTimeout, Promise, addEventListner, and all but there are some API that zone.js doesn't handle then we can add that to the change detection by using the method run.
TrackBy: • trackBy - Efficient fo...
Change Detection: • Change Detection Strat...
Progressive Web Apps Development: bit.ly/359BXpK
Dashboard with chart.js: bit.ly/3c9Jd85
Application Development: bit.ly/398w7Gf
Upload File to server: bit.ly/3ccsjWd
Slack: bit.ly/2RXPcEK
You can support me on Patreon: / funofheuristic
Equipment used for Video:
links for India:
Microphone (AKG D5): amzn.to/3b1gi5R
Audio Interface (EVO 4): amzn.to/327tnGJ
Camera(Canon 200D): amzn.to/3ja1Pr9
Thanks for watching...

Пікірлер: 41
@khadijaaitbouiramouin7776
@khadijaaitbouiramouin7776 3 жыл бұрын
That's perfect, finally understanding the zone in angular and it's benefits thanks a lot for ur content and good luck
@123ankit321
@123ankit321 4 жыл бұрын
Wow. Just what I was looking for. This information is really gold. Your videos have always been helpful. Such quality content.
@harshdeepk9
@harshdeepk9 Жыл бұрын
Good clean content. Quite nice sounding accent. Keep it up bro
@dewinchy
@dewinchy 6 ай бұрын
NgJohn hit me, but yeah, great explanation tho
@aravindrajan398
@aravindrajan398 2 жыл бұрын
Very good explanation. Really awesome bro . pls keep continue ....😀
@venkateshraja2069
@venkateshraja2069 3 жыл бұрын
Your explanation is very good I can understand the topics easily thank you bro
@suganthisingaravel5349
@suganthisingaravel5349 Жыл бұрын
You are teaching awsome
@abhilashrajagopal9455
@abhilashrajagopal9455 2 жыл бұрын
Video and Content is good.. please increase the volume/sound of video, its little bit lesser volume as compare to other YT videos. Thank you
@akshoyd2294
@akshoyd2294 2 жыл бұрын
very interesting content. thanks for sharing.
@VinothKumar5403
@VinothKumar5403 4 жыл бұрын
Most awaited concept..thanks a lot..
@ukranaut
@ukranaut 3 жыл бұрын
Gret njijon ekspranesin, tenkiu.
@sanjitmishra
@sanjitmishra 4 жыл бұрын
Thanks for sharing... Mic is nice and clear.
@shiprakushwaha2284
@shiprakushwaha2284 3 жыл бұрын
Found it so easy to understand good video
@archuser
@archuser 3 жыл бұрын
thanks a lot, pretty helpful video, and sound are great
@DecentralEyes
@DecentralEyes Жыл бұрын
At 0:29 what is "June Jess" ? Sorry, as as English person, I don't understand.
@FunOfHeuristic
@FunOfHeuristic Жыл бұрын
It's zone.js
@raghubalaji4452
@raghubalaji4452 23 күн бұрын
@DecentralEyes... I bet you can read English. It mentioned in the title.
@shubhamgoel7703
@shubhamgoel7703 4 жыл бұрын
I like your content and knowledge. Keep it up :)
@niharikaakepati596
@niharikaakepati596 Жыл бұрын
Thq for the video. After watching the video as per my understanding by adding import 'zone.js' in polyfills.ts we can be able to use two way binding, settimeout, changedetection,..in our project.Am i right?
@aqibsaeed3229
@aqibsaeed3229 3 жыл бұрын
Very nice
@ankush3707
@ankush3707 3 жыл бұрын
So subrat u told in the above video for put request u can run it outside zone what happens if I need to show the response from put request in UI I will be required to run it in UI
@FunOfHeuristic
@FunOfHeuristic 3 жыл бұрын
If you need the response in each call then you should not run the same outside angular, but if you are doing for some other reasons then you can add the response back to angular and that can be displayed in the page.
@praphulagarwal8628
@praphulagarwal8628 4 жыл бұрын
Can you make a complete tutorial on project structure in angular
@FunOfHeuristic
@FunOfHeuristic 4 жыл бұрын
Ya that's already in the Queue, a full stack application.
@Semma_Bore
@Semma_Bore 4 жыл бұрын
Mic sounds nice. No issues from audio. Can you make a video on caching...
@FunOfHeuristic
@FunOfHeuristic 4 жыл бұрын
Thanks for the feedback, I have a video on service worker and angular pwa and it uses caching, so please check that.
@Semma_Bore
@Semma_Bore 4 жыл бұрын
@@FunOfHeuristic But service worker won't cache post request right?
@FunOfHeuristic
@FunOfHeuristic 4 жыл бұрын
Yes that's not advisable, because post request is for creating a record and it depends on the server, but you can cache the response in theory by using Cache-Control or Expires header fields, I have never used it till now.
@milinddholakia1228
@milinddholakia1228 4 жыл бұрын
Can you create a series of Angular with Firebase? And CRUD Operations..also Queries in Firebase
@devangpatel9450
@devangpatel9450 Жыл бұрын
How to implement ngzone in existing angular 9 project
@FunOfHeuristic
@FunOfHeuristic Жыл бұрын
You can use ngZone through dependency injection, so there should not be any problem to use it with existing projects.
@VipinRawat_Offcial
@VipinRawat_Offcial 3 жыл бұрын
Zone.Run() inside runOutsideAngular() is not working.. I'm trying in angular 10
@SantoshThakur-ll3kd
@SantoshThakur-ll3kd 3 жыл бұрын
It was good, Do you have any git/repo?
@finwwwfinwww4669
@finwwwfinwww4669 2 жыл бұрын
nice
@mabos555
@mabos555 3 жыл бұрын
i'm stilll watching this is amazing but man some of the words are hard to understand you said jon but you meant zone.. i'm not intending to make fun of you don't worry and your videos are helpfull at all just wanted to mention that maybe add subtitles in English somehow or pronouce the words slowly it is really hard for me to get some of the words (by mostly hearing what you say while writing notes to myself) my friend :)
@FunOfHeuristic
@FunOfHeuristic 3 жыл бұрын
Thanks for the feedback, I will definitely keep this in mind from next video ☺️
@Santoshthakur100
@Santoshthakur100 3 жыл бұрын
this is not working in Angular 10,11
@anupkumar-ng1gb
@anupkumar-ng1gb 2 жыл бұрын
Please improve audio quality
Change Detection Strategy in Angular
23:17
Fun Of Heuristic
Рет қаралды 48 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 9 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 36 МЛН
WTF is "Zone.js" and is it making your app slow?
13:21
Joshua Morony
Рет қаралды 54 М.
Why didn't the Angular team just use RxJS instead of Signals?
8:15
Joshua Morony
Рет қаралды 94 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 172 М.
Senior Angular Developer Interview (theory)
41:57
WeCoded
Рет қаралды 19 М.
What’s new in Angular v18
20:08
Angular
Рет қаралды 121 М.
Change Detection in Angular - You Project Is 20x Slower!
15:16
Monsterlessons Academy
Рет қаралды 70 М.
I only ever use *these* RxJS operators to code reactively
25:25
Joshua Morony
Рет қаралды 128 М.
These ARE the Angular tips you are looking for | John Papa
25:05