|
1 | | -# angular-interview-questions |
| 1 | +# Angular Interview Questions |
2 | 2 |
|
3 | | -## Make sure what you are going to face |
| 3 | +The goal here is to provide a complete guideline to get that job in angular |
4 | 4 |
|
5 | | -## angular 1 |
6 | 5 |
|
7 | | -Beginners level check these questions |
| 6 | +## Table of Contents |
| 7 | +* [Start with yourself]() |
| 8 | +* [Know the interviewer](#research-the-interviewer) |
| 9 | +* [Beginners level: Terminology related questions](#what-category-questions-angular-terminology) |
| 10 | +* [Beginners level: Doability related questions](#question-to-verify-you-did-some-work) |
| 11 | +* [Beginners level: Understandability related questions](#question-about-understanding) |
8 | 12 |
|
9 | | -Intermediate level |
10 | 13 |
|
11 | | -Expert level |
| 14 | +## Start with yourself |
| 15 | +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 |
12 | 16 |
|
13 | | -## angular2 |
14 | 17 |
|
15 | | -Beginner level |
| 18 | +## Research the interviewer |
| 19 | +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 |
| 20 | +1. Lazy interviewer asks about terminology. Sometimes they google questions and ask you from there. For them see the Termninology related questions |
| 21 | +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 |
| 22 | +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 |
16 | 23 |
|
17 | | -Intermediate level |
18 | 24 |
|
19 | | -Expert level |
| 25 | +## Beginner level |
20 | 26 |
|
21 | | -if you are a moderate it is angular1 check questions here |
| 27 | +You just built hello world in angular2+ and may be you followed some video or blog but you have the courage to tell the interviewer that you know little bit angular2. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +### What category Questions( Angular terminology) |
| 32 | +1. What are the difference between angularJS (angular 1.0) and angular2 |
| 33 | +2. What is a component |
| 34 | +1. What is the minimum definition of a component? |
| 35 | +3. What is a module |
| 36 | +4. What design framework you have used and why |
| 37 | +5. What is a service |
| 38 | +5. What is a promise |
| 39 | +7. What are the life cycle hooks for component and directives |
| 40 | +8. What is pipes |
| 41 | +9. What is a pure pipe? |
| 42 | +9. What is authGuard |
| 43 | +1. What is dumb component |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +### Question to verify you did some work |
| 48 | +1. How do components communicate with each other? |
| 49 | +1. How do you create two way data binding in Angular? |
| 50 | +6. How you build an angular app for production |
| 51 | +6. How would you run unit test |
| 52 | +7. How you create custom pipes |
| 53 | +8. Which life cycle hook will you use to unsbscribe a promise |
| 54 | +1. How can you get current state of a route |
| 55 | +2. How will you protect a route for authorized user only |
| 56 | +1. How to use http service to load data from serve |
| 57 | +1. How are the services injected to your application? |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +### Question about understanding |
| 62 | +2. Why would you use angular-cli |
| 63 | +4. Why would you use a component |
| 64 | +1. Why will you use a module |
| 65 | +3. What are the difference between a component and a directive |
| 66 | +5. Why would you use a module |
| 67 | +6. Why would you use typescript aka benefits of typescript |
| 68 | + |
| 69 | + |
| 70 | +Answers link coming soon |
| 71 | + |
| 72 | +## intermediate developer |
| 73 | + |
| 74 | +you built angular2 you played with routing, https, different built process, unit test, etc. here are the questions you could expect |
| 75 | + |
| 76 | +In the intermediate level you are very compfortable with angular2. Hence there is no what questions. Actually you know all of them by now. Hence there will be only how and why type questions |
| 77 | + |
| 78 | + |
| 79 | +### What category questions (just few bonus) |
| 80 | +1. What is the difference between RouterModule.forRoot() vs RouterModule.forChild()? Why is it important? |
| 81 | +1. What is the difference between an observable and a promise? |
| 82 | +1. What are some of the angular apis that are using observables? |
| 83 | +1. What is the difference between a module's forRoot() and forChild() methods and why do you need it? |
| 84 | +1. What is a structural directive? |
| 85 | +1. What pseudo-class selector targets styles in the element that hosts the component? |
| 86 | +1. What's the difference between dirty, touched, and pristine on a form element? |
| 87 | +1. What is a structural directive? |
| 88 | +1. What is an async pipe? |
| 89 | +1. What kind of data can be used with async pipe? |
| 90 | +1. What is the difference between ngOnInit() and constructor() of a component? |
| 91 | +1. When will ngOnInit be called? |
| 92 | +1. How would you make use of ngOnInit()? |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +### How category questions |
| 98 | +1. How do components communicate with each other? |
| 99 | +1. How do you create two way data binding in Angular? |
| 100 | +1. What is the purpose of NgModule? |
| 101 | +1. How do you decide to create a new NgModule? |
| 102 | +1. How do you identify a structural directive in html? |
| 103 | +1. How would you select a custom component to style it. |
| 104 | +1. How would you select all the child components' elements? |
| 105 | +1. How would you make use of ngOnInit()? |
| 106 | +1. How would you cache an observable data? |
| 107 | +1. How will you inject header |
| 108 | +1. How would you create a custom pipe? |
| 109 | +1. How would you pass data from a parent component to a child component? |
| 110 | +1. How would you pass data from a child component to a parent component? |
| 111 | +1. How would you cache observable data? |
| 112 | +1. How do you mock a service to inject in a unit test? |
| 113 | +1. How do you mock a module in a unit test? |
| 114 | + |
| 115 | + |
| 116 | +### Why category questions |
| 117 | +1. Why angular2 uses decorator |
| 118 | +1. When will ngOnInit be called? |
| 119 | +1. Why do you need type definitions? |
| 120 | +1. Which components will be notified when an event is emitted? |
| 121 | +1. Why would you create shared module? |
| 122 | +1. What would you not put shared module? |
| 123 | +1. Why would you export from ngModule? |
| 124 | +1. Why is it bad if SharedModule provides a service to a lazy loaded module? |
| 125 | +1. What is the difference between an observable and a promise? |
| 126 | +1. Can you explain the difference between ActivatedRoute and RouterState? |
| 127 | +1. which service will you put in the module and why |
| 128 | +1. What is async validation and how is it done? |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | +answers coming soon |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +## Expert Level |
| 137 | + |
| 138 | +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. |
| 139 | + |
| 140 | +### Expect the following questions |
| 141 | + |
| 142 | + |
| 143 | +1. what is factory Component |
| 144 | +1. What is lazy loading |
| 145 | +1. what is AOT |
| 146 | +1. What are some of the Angular Style Guide suggestions you follow on your code? Why? |
| 147 | +1. what is wildcard state? |
| 148 | +1. How do you put animation between two states? |
| 149 | +1. How will you do lazy loading in angular application |
| 150 | +1. What would be a good use for NgZone service? |
| 151 | +1. How would you protect a component being activated through the router? |
| 152 | +1. How would you insert an embedded view from a prepared TemplateRef? |
| 153 | + |
| 154 | + |
| 155 | +## How |
| 156 | +1. How will you http interceptor |
| 157 | +1. How you parallelize multiple observable call |
| 158 | +1. how will you put one async call before another |
| 159 | + |
| 160 | +1. What tools would you use to find a performance issue in your code? |
| 161 | +1. What are some ways you may improve your website's scrolling performance? |
| 162 | +1. Explain the difference between layout, painting and compositing. |
| 163 | +1. When does a lazy loaded module is loaded? |
| 164 | +1. How do you identify a structural directive in html? |
| 165 | +1. How would you create a component to display error messages throughout your application? |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | +1. How would you implement a multiple api calls that needs to happen in order using rxjs? |
| 170 | +1. 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. |
| 171 | +1. 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). |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | +Answers link coming soon |
| 176 | + |
| 177 | + |
| 178 | +## Coding Test |
| 179 | + |
| 180 | +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. |
| 181 | + |
| 182 | +### Expect the following questions |
| 183 | + |
| 184 | + |
| 185 | +How would you implement a brush behavior using rxjs? |
| 186 | +How would you implement a color picker with rxjs? |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | +Answers link coming soon |
| 191 | + |
| 192 | +Few questions are inspired by [Yonet](https://github.com/Yonet/Angular-Interview-Questions) |
0 commit comments