Skip to content

roygopal/angular-interview-questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Angular Interview Questions

The goal here is to provide a complete guideline to get that job in angular. This repo is in baby stage. So feel free to slap with pull requests.

Table of Contents

Understand Your Current Level

The most important step to get that job is to understand yourself. your skill. your strength and your weakness as well. If you don't feel confident about any part. Do a favor yourself by googling and spend few minutes to go throw some blog or youtube videos.

  • If you can create a angular app by using angular-cli or any other seed. also understand component, module, pipes, service, etc. you can consider yourself in the beginners level.If you don't have any clue what I am talking about, watch this video and follow steps.
  • If you have full functional app that is deployed somewhere or have code in github. you understand detail about routing module breakdown, unit test, styling, build etc., you can consider yourself in intermediate level
  • If you master in lazy loading, AOT, you can put yourself in the expert level
  • Rest of the people are either angular dumb or angular rockstar.

Know the Interviewer

Do a favor to yourself. Goggole the interviewer. Look at his/her linkedin provile. Check whether he/she has any youtube video, talk or active blog. and after your research try to put the interviewer in one of the following category

  1. Lazy interviewer asks about terminology. Sometimes they google questions and ask you from there. For them see the Termninology related questions
  2. Modest and nicer interview wants to check whether you can get the job done. and you know stuff. For this kind of interviewer look at the How category questions
  3. Smart interviewer wants to know that you think, you compare and analyze stuff to make consious decisions. For these type of nerdy inteviewer (they would love to prove you wrong. and one important tip: don't try to prove them wrong) you should study why type of questions

Research the team. Search people in the linked in by company name and then look their profile in github.

Beginners Level

For the beginners level an interviewer wants to know whehter this interviewee is self learner, trainable. Hence he/she wants to know you are familiar with basic terminology, coded something and understand why you are using some part in a very high level.

Familiarity to Basic Terminology

  1. What are the difference between angularJS (angular 1.0) and angular2?
  2. What is a component? why would you use it?
  3. What is the minimum definition of a component?
  4. What is a module and what does it contains?
  5. What is a service and why will you use it?
  6. What is a promise? Explain it in simple words.
  7. What are the life cycle hooks for component and directives?
  8. What is pipes?
  9. What is a pure pipe?
  10. What is dumb component

Ability to Build Simple App Questions

  1. How do components communicate with each other?
  2. How do you create two way data binding in Angular?
  3. How you build an angular app for production
  4. How would you run unit test
  5. How you create custom pipes
  6. Which life cycle hook will you use to unsbscribe a promise
  7. How can you get current state of a route
  8. How will you protect a route for authorized user only
  9. How to use http service to load data from serve
  10. How are the services injected to your application?

Understanding Basic Concepts Questions

  1. Why would you use angular-cli
  2. What are the difference between a component and a directive
  3. Why would you use typescript aka benefits of typescript

Answers link coming soon

Intermediate Level

you built angular2 you played with routing, https, different built process, unit test, etc. here are the questions you could expect

In the intermediate level you are very comfortable with angular. Hence there is no what questions. Actually you know all of them by now. Hence there will be only how and why type questions

Essential Terminology Questions

  1. What is the difference between RouterModule.forRoot() vs RouterModule.forChild()? Why is it important?
  2. What is the difference between an observable and a promise?
  3. What are some of the angular apis that are using observables?
  4. What is the difference between a module's forRoot() and forChild() methods and why do you need it?
  5. What is a structural directive?
  6. What pseudo-class selector targets styles in the element that hosts the component?
  7. What's the difference between dirty, touched, and pristine on a form element?
  8. What is a structural directive?
  9. What is an async pipe?
  10. What kind of data can be used with async pipe?
  11. What is the difference between ngOnInit() and constructor() of a component?
  12. When will ngOnInit be called?
  13. How would you make use of ngOnInit()?
  14. What is authGuard

Comfortability to Build Medium Size App Questions

  1. How do components communicate with each other?
  2. How do you create two way data binding in Angular?
  3. What is the purpose of NgModule?
  4. How do you decide to create a new NgModule?
  5. How do you identify a structural directive in html?
  6. How would you select a custom component to style it.
  7. How would you select all the child components' elements?
  8. How would you make use of ngOnInit()?
  9. How would you cache an observable data?
  10. How will you inject header
  11. How would you create a custom pipe?
  12. How would you pass data from a parent component to a child component?
  13. How would you pass data from a child component to a parent component?
  14. How would you cache observable data?
  15. How do you mock a service to inject in a unit test?
  16. How do you mock a module in a unit test?

Core Concepts Understandability Questions

  1. Why angular2 uses decorator
  2. When will ngOnInit be called?
  3. Why do you need type definitions?
  4. Which components will be notified when an event is emitted?
  5. Why would you create shared module?
  6. What would you not put shared module?
  7. Why would you export from ngModule?
  8. Why is it bad if SharedModule provides a service to a lazy loaded module?
  9. What is the difference between an observable and a promise?
  10. Can you explain the difference between ActivatedRoute and RouterState?
  11. which service will you put in the module and why
  12. What is async validation and how is it done?

answers coming soon

Expert Level

you just built hello world in angular2+ and may be you followed some video or blog and now you are brave enough to tell the interviewer that you know little bit angular2.

Performance and Edge case Related Terminology

  1. what is factory Component
  2. What is lazy loading
  3. what is AOT
  4. What are some of the Angular Style Guide suggestions you follow on your code? Why?
  5. what is wildcard state?
  6. How do you put animation between two states?
  7. How will you do lazy loading in angular application
  8. What would be a good use for NgZone service?
  9. How would you protect a component being activated through the router?
  10. How would you insert an embedded view from a prepared TemplateRef?

Master a Large App Related Questions

  1. How will you http interceptor

  2. How you parallelize multiple observable call

  3. how will you put one async call before another

  4. What tools would you use to find a performance issue in your code?

  5. What are some ways you may improve your website's scrolling performance?

  6. Explain the difference between layout, painting and compositing.

  7. When does a lazy loaded module is loaded?

  8. How do you identify a structural directive in html?

  9. How would you create a component to display error messages throughout your application?

Rockstar and Fighter for Angular Questions

  1. How would you implement a multiple api calls that needs to happen in order using rxjs?
  2. How would you make sure an api call that needs to be called only once but with multiple conditions. Example: if you need to get some data in multiple routes but, once you get it, you can reuse it in the routes that needs it, therefor no need to make another call to your backend apis.
  3. If you need to respond to two different Observable/Subject with one callback function, how would you do it?(ex: if you need to change the url through route parameters and with prev/next buttons).

Answers link coming soon

Coding Test

This part coming soon 2. How would you implement a brush behavior using rxjs? 3. How would you implement a color picker with rxjs?

Answers link coming soon

Few questions are inspired by Yonet

About

Most extensive Angular interview questions based on your level.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 55.8%
  • CSS 44.2%