The best way to prepare for an upcoming interview is Mock-Interview! In my new course "Angular Interview Hacking" you can get an option to have a mock interview with Google Developer Expert in Angular and get access to a constantly growing database of the most popular Angular interview questions and detailed answers! Check this out here: courses.decodedfrontend.io/courses/angular-interview-hacking
Hi guys, There is no coding for today. Instead I decided to share with you my TOP 5 Angular interview questions. This is kind of experimental video, so please let me know if you like it and if you are interested in more videos like this. Any feedback is important and appreciated. Thank you 🙏🏻
More optimizations techniques: runOutsideAngular heavy scripts or 3rd party libraries, detach view from change detection, lazy-load components via dynamic imports, avoid many *ngIfs, ngSwitches in templates and use dynamic components, virtual scroll for large lists, server-side pagination, caching, service-workers.
@@Bogdan_Lysenko, detach() method of ChangeDetectorRef class. So it basically let us turn off change detection. When it's needed - it can be turned on back with reattach(), followed by manual start of change detection cycle with detectChanges().
@@Bogdan_Lysenko I think means use changeDetectionStrategy.OnPush and in the constructor, you can use changeDetectionRef service and call changeDetectionRef.detach(). It is used for some components that don't need to be checked for change detection. For example, a footer that has only representation (html + css).
Greetings from Kyiv :) Spent my last week searching new job as Front-End Developer with Angular. Can strongly confirm that all questions you mentioned - I heard them myself. DI and CD are really primary patterns in Angular and developer should know its native implementations. ps. btw, most of advanced topics I was asked during tech-interview are covered here, explained by Dmytro. Got 5+ job offers eventually.
Hey Dmytro! I just wanna say thanks because I just landed a fully remote Angular job by watching your videos. All the questions during my technical interview were spot on! Keep up the good work. Could grab you a beer if I see you in Austria someday 🤣
Wow, well done! Congratulations with a new Job and wish you huge success there🎉 I am super happy that my videos helped you with preparation, stories like yours inspire me! P.s looking forward to see you in Austria 😅🍻
Hey Dmytro @Decoded Frontend In the difference between observables & promises: In Observables: It stops(cancellable) when we use unsubscribe() method , and subscribe() method is responsible for the error handling process In Promises: It does not stop(not cancellable) and push errors to child promises
@Decoded Frontend change detection, page load, UX improvements, Server-side rendering with Angular Universal, Lazy load routes, Optimizing bundling and preloading , Cache HTTP calls and Cache static content using Angular PWA, Using trackBy in ngFor . The way you should go about any improvement in a system is that you should first identify bottlenecks
I'd like to add advanced Pipe knowledge and experience as requirement for senior positions. We didn't use a lot of Pipes in my last job, but so far many interviews have asked about pipes, conceptually how do they work, what does each decorator mean and what is happening "under the hood" broadly. I was directly asked about what is it you have to modify or override whenever you're creating a custom pipe.
Hi, Yes, for sure Pipes are very important and experienced developers should be aware of it. In this video I just wanted to highlight top 5 essential things. My logic was like: if a candidate has no idea how Change Detection works - it doesn't matter already if he/she knows Pipes and what the difference between pure/impure pipes etc. Most probably candidate will not be able to build efficient Angular App without knowledge about change detection or DI. So these 5 questions for me as a guard: if someone can pass it then it makes sense to ask about forms, pipes, router etc depending on a project :)
Hi.. I'm your new subscriber and I literally loving the complex topics and techniques you use to explain things..just amazing. A new fan along with a subscriber. Thanks a lot!
Hi, thanks for your videos. I'm currently working as a frontend developer using React but I love Angular and I find your channel very useful. Stay safe
Hi Manos! Not, really. You can say that promise is always microtask but with Observables it is trickier because it depends which scheduler is being used for Observable. In fact you can run observable as micro- or macrotask or even synchronous.. many observables executed as macrotask but you can’t claim that all of them are macrotasks. I have a great video about this topic, you can check it out here th-cam.com/video/-OhAR6l-Q0Q/w-d-xo.html
Hi, it is your next interesting video. I would add to your question list one more - when you use react driven forms instead of template driven forms. And from that point I would come smoothly to the differences between these two. Forms are used in almost every app, so I think it nice to learn candidate's knowledge in this area.
Have you done any videos with a little more details on RxJs, observables and promises (within Angular)? I'd love more information about basic concepts but also about best practices. For example, we were taught to where possible always use pipe->takeUntil rather than manual subscriptions. What situation would we use a promise? I personally have never had a need to/learned how to use it, so I would love to learn this. Maybe also tips about the Map operations like switchMap vs ExhaustMap. Outer observables vs inner ones.
Injection is very storng. I love this pattern. For example I provide an Authentification Service in the app.module.ts or app.component.ts. This service will be created once and exist as long as the program runs. Now we can simply inject this service everywhere we need it, for example in a login component. Also we can inject it into other services which may need authentification infos (for example header with accessToken for jwt) for their http transactions. For the HttpClient I am actually not sure if it would be better to use the Authentification Services HttpClient or give the besaid service its own HttpClient... Anyway those services which use the authentification service can be provided anywhere (app-level or component-level) and automatically get the Authentification Service injected on construction/instantiation. Super cool. I also wrote my own "DialogHandler" which uses Angular Materials Dialog things and is injectable itself. In it I define methods for opening "concrete" Dialogs, which I could need in my app (Confirmation Dialog, etc...). If I have a component which opens dialogs I simply inject the DialogHandler and have all I need. If I defined new Dialog Components I simply add a new method to the DialogHandler and done.
Welcome and thank you for feedback, Melissa! :) There are already advanced tutorial on the channel you can already check out. There are some playlists: 1) About complex form controls th-cam.com/play/PLX7eV3JL9sfkgIka4CmlLMkErbaVPe4LC.html 2) About Angular CDK th-cam.com/play/PLX7eV3JL9sfkdwkADI4PVDmNins_fO_vp.html
as for optiminzations: what do you think about polling? also I know that not using the ngModel for templated form and just use reactive forms instead is better for perfomance since there is no actually need to use another directive in the middle just for form validations and such.
I think polling solves different task, it just asks server for updates. However... you know, you might be right. In some cases it can be used as a one of optimizations technique. As example I remember that Twitter used to show just a counter of how many new twits you have and in order to load all of them you had to click on this banner, so it can optimize your app as well to some extent because definitely counting operation should be faster rather then fetching of whole tweet but it is just my suggestion:)
@@DecodedFrontend thanks, yeah sometimes we just need to use polling mechanism somehow and about the difference between reactive vs templated form control?
Regarding forms can say nothing because I hear it first time and I would need some research there. Reactive Forms are more flexible and easier to reuse but if it improves performance I don’t know (yet) 😄
Nice guide you made there. I have question regarding subscription. In angular httpmodule use observable by default. Do i need to unsubcribe in each call api ?
Hello Dmytro !! Best wishes from India, I love to watch your videos - the content is un-paralleled. In this video on the optimization topic - I think we should also mention the output compression e.x. gz compression, brotli compression from web server end which also decreases the bundled js files. Just a thought. Thanks again and keep making these wonderful videos.
Hi, thank you for your feedback! I understand your point. For me it was also a dilemma “to include snippets or not” but with snippets and more detailed explanation the video would be around at least 1.5 hour and I decided to go without it but I will cover the most interesting parts in separate videos (Change detection, DI etc). Sorry for inconvenience
question: as for the Dep Injection part, what about the root? if angular can't find the dep. in the parents or the module, won't he check it in the root? for example by creating your own service and configure it to provide forRoot in the app.module (which is still consider to search in the module I guess)... anyway how can I : a. answer the same question but this time mention the services. b. answer the same question but this time mention the root. thanks
Hi! :) thanks for the question. I have the whole video series about DI in Angular where you can find answer to your questions. You can start from here - th-cam.com/video/G8zXugcYd7o/w-d-xo.html
Hi! Thank you😊 the thing is that I was not sure that this format and this topic will be interesting for my subscribers, so it was just validation of an idea. If I see that there is demand I will extend the answers in next videos but thank you for feedback it was very important hint😊
To be honest, I am very surprised. Those are essentials that is hard to avoid. However, I would be very grateful if you could tell some questions you were asked? Thank you!
small mistake at duartion 10:44 instead of promise you said obsevable has then and catch method. not pointing out your mistake, just want to clear other peoples concep.
@Decoded Frontend, First of all thanks for sharing such valuable knowledge, appreciated. Regarding Observable Vs Promise. Is it really a good interview question for any angular expert who did not worked with promise. Its not necessary to understand promise for interview purpose. Just a thought bcz since the beginning of Angular 2 I have been using observables only.
In another video is saw : Interviewer how many years of angular xp do you have? Interviewee : 2 years Interviewer : what's the default port for angular? Interviewee : *no response*
The best way to prepare for an upcoming interview is Mock-Interview! In my new course "Angular Interview Hacking" you can get an option to have a mock interview with Google Developer Expert in Angular and get access to a constantly growing database of the most popular Angular interview questions and detailed answers! Check this out here: courses.decodedfrontend.io/courses/angular-interview-hacking
Hi guys,
There is no coding for today. Instead I decided to share with you my TOP 5 Angular interview questions. This is kind of experimental video, so please let me know if you like it and if you are interested in more videos like this. Any feedback is important and appreciated. Thank you 🙏🏻
Have shared any video on Angular unit testing?
More optimizations techniques: runOutsideAngular heavy scripts or 3rd party libraries, detach view from change detection, lazy-load components via dynamic imports, avoid many *ngIfs, ngSwitches in templates and use dynamic components, virtual scroll for large lists, server-side pagination, caching, service-workers.
Excellent! :) I feel you would pass my interview ;)
What do you mean by "detach view from change detection"?
@@Bogdan_Lysenko, detach() method of ChangeDetectorRef class. So it basically let us turn off change detection. When it's needed - it can be turned on back with reattach(), followed by manual start of change detection cycle with detectChanges().
@@Bogdan_Lysenko I think means use changeDetectionStrategy.OnPush and in the constructor, you can use changeDetectionRef service and call changeDetectionRef.detach(). It is used for some components that don't need to be checked for change detection. For example, a footer that has only representation (html + css).
Greetings from Kyiv :)
Spent my last week searching new job as Front-End Developer with Angular. Can strongly confirm that all questions you mentioned - I heard them myself. DI and CD are really primary patterns in Angular and developer should know its native implementations.
ps. btw, most of advanced topics I was asked during tech-interview are covered here, explained by Dmytro. Got 5+ job offers eventually.
Congratulations
Currently, one of the best Angular channel!
Hey Dmytro! I just wanna say thanks because I just landed a fully remote Angular job by watching your videos. All the questions during my technical interview were spot on! Keep up the good work. Could grab you a beer if I see you in Austria someday 🤣
Wow, well done! Congratulations with a new Job and wish you huge success there🎉 I am super happy that my videos helped you with preparation, stories like yours inspire me!
P.s looking forward to see you in Austria 😅🍻
Hey Dmytro
@Decoded Frontend
In the difference between observables & promises:
In Observables:
It stops(cancellable) when we use unsubscribe() method , and subscribe() method is responsible for the error handling process
In Promises:
It does not stop(not cancellable) and push errors to child promises
@Decoded Frontend
change detection, page load, UX improvements, Server-side rendering with Angular Universal, Lazy load routes, Optimizing bundling and preloading
, Cache HTTP calls and Cache static content using Angular PWA, Using trackBy in ngFor
. The way you should go about any improvement in a system is that you should first identify bottlenecks
You'll never escape without "Different type of subjects" :)), but yes, your points of view are very real.
even after 3 years, your content really helpful to understand complex topics, thank you.
If you talk about performance, we can also use: WebWorkers; preloading; runOutsideAngular, cdr.detach, reatach; memoization function etc.
Excellent! 😉
Dude, your content is amazing. Keep up with these great videos. Thanks from 🇧🇷
Thank you William! Glad you like it ;)
Hey man - nice content, really appreciate your work. Thanks. Cheers from Argentina
My pleasure! 😉
I'd like to add advanced Pipe knowledge and experience as requirement for senior positions. We didn't use a lot of Pipes in my last job, but so far many interviews have asked about pipes, conceptually how do they work, what does each decorator mean and what is happening "under the hood" broadly. I was directly asked about what is it you have to modify or override whenever you're creating a custom pipe.
Hi,
Yes, for sure Pipes are very important and experienced developers should be aware of it.
In this video I just wanted to highlight top 5 essential things. My logic was like: if a candidate has no idea how Change Detection works - it doesn't matter already if he/she knows Pipes and what the difference between pure/impure pipes etc. Most probably candidate will not be able to build efficient Angular App without knowledge about change detection or DI. So these 5 questions for me as a guard: if someone can pass it then it makes sense to ask about forms, pipes, router etc depending on a project :)
All right! So I'll mention your YT channel, as a good source of Angular news on my following job interview 😄
Much appreciation from India! Thanks
Hi.. I'm your new subscriber and I literally loving the complex topics and techniques you use to explain things..just amazing. A new fan along with a subscriber. Thanks a lot!
Thank you so much 🙂
i did that subscribe inside subscribe thing.. i even do it it today.. thank god I found this video.. now I know m bad programmer
We are all learning, do not worry :) Thanks for feedback!
Hey, this really help. One point ,10:45 should be promise, is it?
Yes, exactly! Sorry I just misspelled it :) Of course it was Promise
Hi, thanks for your videos. I'm currently working as a frontend developer using React but I love Angular and I find your channel very useful. Stay safe
I appreciate it! Thank you very much and stay safe too 😊
Can I say that observable operations are micro tasks and promises are macrotasks?
Hi Manos! Not, really. You can say that promise is always microtask but with Observables it is trickier because it depends which scheduler is being used for Observable. In fact you can run observable as micro- or macrotask or even synchronous.. many observables executed as macrotask but you can’t claim that all of them are macrotasks. I have a great video about this topic, you can check it out here th-cam.com/video/-OhAR6l-Q0Q/w-d-xo.html
You can unsubscribe in observables but in promises you can not. ( for memory things )
Hi! Thank you 😊 yep exactly, You are absolutely right!
Good content. I just got a job as a mid front-end developer and want to develop my skills before starting my new job :)
"then" is for Promise not observable.
Great content 👍
Hi,
Thanks! Yes, of course "then" and "catch" is for Promise. I just misspoke
I'm about to apply for an Angular position and this seems really useful, thanks!
Point about Optimization - can be as separate video. Little bit complex to understand it in briefly descr.... Thank you!
Please create scenario based questions as well, we can learn from you.
Thanks for suggestion! I will think about it 🙂
very nice explanation, i am fan of your knowledge. 👍
Hey man, do you have or plan a course about microfrontends with angular?, ps: your videos are cool
Hi Samuel! I have plans but it will be already in 2022
Really good stuff. Expecting another set of interview questions.
Absolutely great channel!
Hey Dmytro!
Nice content!!! I appriciate your explanation of topic...
Thanks for being here...
What is the best architecture pattern for building angular ?
I always comeback to this channel. Thanks for the fun 🙏
Hi, it is your next interesting video. I would add to your question list one more - when you use react driven forms instead of template driven forms. And from that point I would come smoothly to the differences between these two. Forms are used in almost every app, so I think it nice to learn candidate's knowledge in this area.
Hi! Yeah, it is also worth to mention forms you are right. In the pt.2 I will definitely include it :)
OMG thanks for sharing this video, I love you! ❣️
You are so welcome!
Have you done any videos with a little more details on RxJs, observables and promises (within Angular)? I'd love more information about basic concepts but also about best practices. For example, we were taught to where possible always use pipe->takeUntil rather than manual subscriptions. What situation would we use a promise? I personally have never had a need to/learned how to use it, so I would love to learn this. Maybe also tips about the Map operations like switchMap vs ExhaustMap. Outer observables vs inner ones.
Injection is very storng. I love this pattern.
For example I provide an Authentification Service in the app.module.ts or app.component.ts. This service will be created once and exist as long as the program runs.
Now we can simply inject this service everywhere we need it, for example in a login component. Also we can inject it into other services which may need authentification infos (for example header with accessToken for jwt) for their http transactions. For the HttpClient I am actually not sure if it would be better to use the Authentification Services HttpClient or give the besaid service its own HttpClient...
Anyway those services which use the authentification service can be provided anywhere (app-level or component-level) and automatically get the Authentification Service injected on construction/instantiation. Super cool.
I also wrote my own "DialogHandler" which uses Angular Materials Dialog things and is injectable itself. In it I define methods for opening "concrete" Dialogs, which I could need in my app (Confirmation Dialog, etc...).
If I have a component which opens dialogs I simply inject the DialogHandler and have all I need. If I defined new Dialog Components I simply add a new method to the DialogHandler and done.
New subscriber here 😀 I like this content. I hope we can see advanced topics/tutorials about angular 🔥
Welcome and thank you for feedback, Melissa! :) There are already advanced tutorial on the channel you can already check out. There are some playlists: 1) About complex form controls th-cam.com/play/PLX7eV3JL9sfkgIka4CmlLMkErbaVPe4LC.html 2) About Angular CDK th-cam.com/play/PLX7eV3JL9sfkdwkADI4PVDmNins_fO_vp.html
@@DecodedFrontend Great. I'll take a look. 🔥🔥 Thanks!!!
as for optiminzations: what do you think about polling?
also I know that not using the ngModel for templated form and just use reactive forms instead is better for perfomance since there is no actually need to use another directive in the middle just for form validations and such.
I think polling solves different task, it just asks server for updates. However... you know, you might be right. In some cases it can be used as a one of optimizations technique. As example I remember that Twitter used to show just a counter of how many new twits you have and in order to load all of them you had to click on this banner, so it can optimize your app as well to some extent because definitely counting operation should be faster rather then fetching of whole tweet but it is just my suggestion:)
@@DecodedFrontend thanks, yeah sometimes we just need to use polling mechanism somehow
and about the difference between reactive vs templated form control?
Regarding forms can say nothing because I hear it first time and I would need some research there. Reactive Forms are more flexible and easier to reuse but if it improves performance I don’t know (yet) 😄
Thanks Decoded Frontend for sharing quality knowledge
Nice guide you made there.
I have question regarding subscription. In angular httpmodule use observable by default. Do i need to unsubcribe in each call api ?
Hi :) Usually you don’t need to unsubscribe for this kind of observables because Angular will care about it
Nice template , I will use this to test candidates 😛
Farida Khoja sure! 😉
if you also have some interesting questions please do not hesitate to share them as well
Hello Dmytro !!
Best wishes from India, I love to watch your videos - the content is un-paralleled. In this video on the optimization topic - I think we should also mention the output compression e.x. gz compression, brotli compression from web server end which also decreases the bundled js files. Just a thought. Thanks again and keep making these wonderful videos.
Good job!
There is one more subject in RxJS => Void subject
very good content !
Brotli compression is awesome optimization method
Hi Dmytro, could you do a video like this for advance level, very appreciate it
Thanks for such a great video....!!
AOT aslo will help us to optimize angular application
Exactly! Fortunately from Angular 9 it is by default
Important, always missed by juniors, trackBy function
Hi Dmytro, unique and really helpful videos. Keep up the good work :D
Thank you! I am glad to hear it. will keep it up for sure ;)
You nailed it thanks 👍
Glad it helped
Bro,
Now i see a Realy senior angular developer
Great tips. Thank you.
Glad it was helpful!
Awesome!
@10.43 it should be promise I think 😀
yeah... of course you right it should have been Promise :) Sorry, I misspelt.
I am impressed how carefully you are listening to 😀 Thank you!
Nice content, really appreciate your work. Thanks
My pleasure!
Just a suggestion, it would be really helpful if you could explain the concept with the real project code snippets.
Hi, thank you for your feedback! I understand your point. For me it was also a dilemma “to include snippets or not” but with snippets and more detailed explanation the video would be around at least 1.5 hour and I decided to go without it but I will cover the most interesting parts in separate videos (Change detection, DI etc). Sorry for inconvenience
question: as for the Dep Injection part, what about the root?
if angular can't find the dep. in the parents or the module, won't he check it in the root?
for example by creating your own service and configure it to provide forRoot in the app.module (which is still consider to search in the module I guess)...
anyway how can I :
a. answer the same question but this time mention the services.
b. answer the same question but this time mention the root.
thanks
Hi! :) thanks for the question. I have the whole video series about DI in Angular where you can find answer to your questions. You can start from here - th-cam.com/video/G8zXugcYd7o/w-d-xo.html
Thanks for your good great video. You must continue, expression, good language. I'm a foreign person but understand you. It should be just like that.
Thank you very much! I am glad to hear it! :)
Great topics for interviews!
Questions regarding unit testing would be helpful as well
I thought I was pretty experienced in Angular.. turns out I'm still missing a lot :|
hey great video. it show me things I missed but it would be also super to have more detailed explanation Thanks a lot
Hi! Thank you😊 the thing is that I was not sure that this format and this topic will be interesting for my subscribers, so it was just validation of an idea. If I see that there is demand I will extend the answers in next videos but thank you for feedback it was very important hint😊
none of these question were asked in the interview. :(
To be honest, I am very surprised. Those are essentials that is hard to avoid. However, I would be very grateful if you could tell some questions you were asked? Thank you!
Your Angular Interview on Angular Interview!
Such a helpful video, thanks
Excellent job 👏🏻 0
Not so easy to find even an Angular interview in Hong Kong sadly.
Sorry to hear that :(
small mistake at duartion 10:44
instead of promise you said obsevable has then and catch method. not pointing out your mistake, just want to clear other peoples concep.
@Decoded Frontend, First of all thanks for sharing such valuable knowledge, appreciated. Regarding Observable Vs Promise. Is it really a good interview question for any angular expert who did not worked with promise. Its not necessary to understand promise for interview purpose. Just a thought bcz since the beginning of Angular 2 I have been using observables only.
It will help me in interview... Please add something for reactjs...
Good video
Thanks🙂
very nice! Thanks!
спасибо ;)
Thank you! Very Helpful
Johnny thank you for feedback:)
he or she knows ? What about they/them or zyr/zyrs
Nothing is perfect
@@DecodedFrontend i am joking. Good videos and presentations.
Hahahhaha the ngZone explanation. “Ng” and “zone”
Yeah, sometimes you can hear a lot of 'interesting stuff' :D
Thank you
Observables have many operators not promise
Yes, exactly:)
nice man
Thanks
Thank you
10:41 Promise*
In another video is saw :
Interviewer how many years of angular xp do you have?
Interviewee : 2 years
Interviewer : what's the default port for angular?
Interviewee : *no response*
4200 ?
I like 🅰️
resolver
Hey man, do you have or plan a course about microfrontends with angular?, ps: your videos are cool