Top 300+ Most Asked Angular Interview Questions

Deep-dive into Angular fundamentals, TypeScript integration, MVVM architecture, and component-template interactions.

0%

Overall Progress

0/310

1.What is Angular? How is it different from AngularJS?

2.What are the key features of Angular?

3.What is TypeScript? Why does Angular use it?

4.What is a component in Angular?

5.What is the structure of an Angular component?

6.What are decorators in Angular?

7.What is @Component decorator?

8.What is a module in Angular?

9.What is @NgModule decorator?

10.What is the root module (AppModule)?

11.What is the Angular CLI? How do you use it?

12.How do you create a new Angular project?

13.What is the Angular bootstrapping process?

14.What happens internally when Angular bootstraps?

15.What is main.ts file?

16.What is platformBrowserDynamic()?

17.What is the role of index.html in Angular?

18.What is app.component.ts?

19.What is the component lifecycle in Angular?

20.What is data binding in Angular?

21.Explain the MVVM architecture pattern in Angular

22.What is Model-View-Controller (MVC) vs MVVM?

23.What is an Angular NgModule, and how does it organize code structure?

24.What are feature modules?

25.What are shared modules?

26.What are core modules?

27.What is the difference between declarations, imports, and exports in NgModule?

28.What is the purpose of BrowserModule?

29.What is CommonModule?

30.When do you use FormsModule vs ReactiveFormsModule?

31.How do you create a component using Angular CLI?

32.What is component metadata?

33.What is a template in Angular?

34.What are inline templates vs external templates?

35.What is template syntax in Angular?

36.What is interpolation ({{ }}) in Angular?

37.What is property binding ([property])?

38.What is event binding ((event))?

39.What is two-way binding ([(ngModel)])?

40.What is the difference between property binding and interpolation?

41.What is attribute binding?

42.What is class binding?

43.What is style binding?

44.What are template reference variables (#variable)?

45.What is ViewChild and ViewChildren?

46.What is ContentChild and ContentChildren?

47.What is the difference between ViewChild and ContentChild?

48.What is content projection (ng-content)?

49.What are multi-slot content projections?

50.What is ng-container?

51.What are directives in Angular?

52.What are the types of directives?

53.What are component directives?

54.What are structural directives?

55.What are attribute directives?

56.Explain the difference between structural and attribute directives.

57.What is *ngIf directive?

58.What is *ngFor directive?

59.What's the significance of trackBy in *ngFor, and how does it improve rendering?

60.What is *ngSwitch directive?

61.What is ngClass directive?

62.What is ngStyle directive?

63.What is ngModel directive?

64.How do you create custom directives (structural/attribute)?

65.How do you create a custom structural directive?

66.What is Dependency Injection (DI)?

67.Why is Dependency Injection important in Angular?

68.What is an injector in Angular?

69.What are providers in Angular?

70.What is the difference between providers and viewProviders?

71.How does the inject() API improve dependency injection compared to constructor-based DI?

72.What are the different ways to provide services?

73.What is providedIn: 'root'?

74.What are tree-shakable providers, and how do they optimize bundle size?

75.Explain the dependency injection hierarchy and token resolution in Angular.

76.What is an InjectionToken, and when would you use it?

77.What are resolution modifiers in DI?

78.What are resolution modifiers (Optional, Self, SkipSelf), and how are they used?

79.What is @Optional decorator?

80.What is @Self decorator?

81.What is @SkipSelf decorator?

82.What is @Host decorator?

83.What is hierarchical dependency injection?

84.What is the difference between providedIn: 'root' and providing in module?

85.What are multi-providers?

86.What is a service in Angular?

87.How do you create a service?

88.What is @Injectable decorator?

89.What is the difference between @Injectable() and @Injectable({ providedIn: 'root' })?

90.How can you share data between distant components in a large application?

91.What is a singleton service?

92.How do you create a singleton service?

93.What is the purpose of services in Angular?

94.How do you inject a service into a component?

95.How do you inject a service into another service?

96.What are pipes in Angular?

97.What are built-in pipes in Angular?

98.What is the difference between pure and impure pipes?

99.What are pure vs. impure pipes? Which one is better for performance?

100.How do you create a custom pipe?

101.What is @Pipe decorator?

102.What is async pipe?

103.How does async pipe help with memory management?

104.What is the date pipe?

105.What are parameterized pipes?

106.What are the types of forms in Angular?

107.What are Template-driven forms?

108.What are Reactive forms?

109.What is the difference between Template-driven and Reactive forms?

110.Which form approach is better and when?

111.What is FormControl, FormGroup, and FormArray?

112.What is FormBuilder?

113.How do you validate forms in Angular?

114.What are built-in validators?

115.How do you create custom validators?

116.What is async validator?

117.What is valueChanges observable?

118.What is statusChanges observable?

119.How do you handle form submission?

120.How do you reset a form?

121.What is routing in Angular?

122.What is the Angular Router?

123.How do you configure routes?

124.What is RouterModule.forRoot() vs RouterModule.forChild()?

125.What is <router-outlet>?

126.What is routerLink directive?

127.What is routerLinkActive directive?

128.What are route parameters?

129.How do you access route parameters?

130.What is ActivatedRoute?

131.What are query parameters?

132.What is programmatic navigation?

133.What is the Router service?

134.What are child routes (nested routes)?

135.What are route guards?

136.What are the types of route guards?

137.What is CanActivate guard?

138.What is CanDeactivate guard?

139.What is CanLoad guard?

140.What is Resolve guard?

141.What is the difference between CanActivate and CanLoad?

142.How do you implement authentication using guards?

143.What is lazy loading in Angular?

144.How would you implement lazy loading, and when is it useful?

145.How do you configure lazy loading?

146.What is the benefit of lazy loading?

147.What is preloading strategy?

148.What are the built-in preloading strategies?

149.How do you create a custom preloading strategy?

150.What is code splitting in Angular?

151.What is Change Detection in Angular?

152.How does Angular's Change Detection work?

153.What is Zone.js?

154.What is the role of NgZone?

155.How do you optimize applications using runOutsideAngular()?

156.What are Change Detection strategies?

157.What is OnPush Change Detection?

158.Explain the importance of OnPush change detection and how to apply it effectively.

159.What triggers Change Detection?

160.How do you manually trigger Change Detection?

161.What is markForCheck() method?

162.What is detectChanges() method?

163.What is JIT (Just-in-Time) Compilation?

164.What is AOT (Ahead-of-Time) Compilation?

165.What are the benefits of AOT compilation?

166.What is RxJS?

167.What are Observables?

168.What is the difference between Observable and Promise?

169.What is a Subject in RxJS?

170.What is BehaviorSubject?

171.What is switchMap operator?

172.What is mergeMap operator?

173.What is concatMap operator?

174.What is exhaustMap operator?

175.Compare combineLatest, withLatestFrom, and forkJoin in RxJS.

176.What are Signals in Angular?

177.Compare Signals and RxJS Observables - when would you use each?

178.What is signal(), computed(), and effect()?

179.What is HttpClient in Angular?

180.What are HTTP interceptors?

181.What is TestBed?

182.How does Renderer2 work, and why is direct DOM access discouraged in Angular?

183.What are the core concepts of NgRx (Store, Actions, Reducers, Effects, Selectors)?

184.What causes ExpressionChangedAfterItHasBeenCheckedError?

185.What is Server-Side Rendering (SSR) in Angular?

186.What is Angular Ivy?

187.What is the difference between map and switchMap?

188.What is a ReplaySubject?

189.What is the takeUntil operator?

190.How do you unsubscribe from Observables?

191.What are the benefits of Signals over RxJS for simple state?

192.What are Signal effects, and when should you use them?

193.What is signal-based change detection?

194.What is HttpTestingController?

195.How do you handle errors in HTTP requests?

196.What is ComponentFixture?

197.What is ElementRef?

198.What is ViewContainerRef?

199.What is the difference between NgRx and services for state management?

200.How do you debug an 'Expression has changed' error effectively?

201.What is debounceTime operator?

202.What is distinctUntilChanged operator?

203.What is AsyncSubject?

204.What is the difference between Subject, BehaviorSubject, and ReplaySubject?

205.What are the benefits of Signals?

206.How do you create a Signal?

207.What is the future of Signals in Angular?

208.How do you perform GET, POST, PUT, DELETE requests?

209.What is Jasmine?

210.What is Karma?

211.What is the difference between Jasmine and Karma?

212.How do you write unit tests for components?

213.What is DebugElement?

214.Why should you avoid using nativeElement directly?

215.How do you dynamically create components?

216.What is Angular Material?

217.What is theming in Angular Material?

218.When should you use NgRx?

219.What are alternatives to NgRx (Akita, NGXS)?

220.How do you handle errors globally in Angular?

221.What are Angular DevTools?

222.What is Angular Universal?

223.What is a Service Worker?

224.What is differential loading?

225.What is the difference between ng build and ng build --prod?

226.What is webpack-bundle-analyzer?

227.What is Smart vs Dumb (Presentational) component pattern?

228.How do you prevent XSS attacks?

229.What is DomSanitizer?

230.What is the Angular style guide?

231.What is a PWA (Progressive Web App)?

232.How do you create a PWA with Angular?

233.What are Web Workers in Angular?

234.What is Internationalization (i18n)?

235.How do you implement i18n in Angular?

236.What is @angular/localize?

237.What are the benefits of Ivy over the old View Engine?

238.How do you build an Angular application for production?

239.What is the difference between ng build and ng build --prod?

240.How do you analyze bundle size in Angular?

241.What deployment platforms can you use for Angular?

242.What is environment configuration in Angular?

243.What are Angular coding best practices?

244.What is the container component pattern?

245.How do you structure a large Angular application?

246.What are security best practices in Angular?

247.What is sanitization in Angular?

248.What is the performance optimization checklist for Angular?

249.What is bundle size optimization?

250.What is the difference between declarations, imports, and exports in NgModule?

251.What is the purpose of View Engine (deprecated)?

252.How do you customize Material components?

253.What are multi-providers?

254.What is @Host decorator?

255.How does trackBy improve rendering performance?

256.What is content projection?

257.What is the difference between ViewChild and ContentChild?

258.What is the purpose of FormsModule?

259.What is the difference between FormControl and FormGroup?

260.What are feature modules?

261.How do you debug Angular applications effectively?

262.How do you debug a 'Expression has changed after it was checked' error?

263.What is ErrorHandler in Angular?

264.How do you create a custom error handler?

265.What is an error boundary in Angular?

266.What is the Redux pattern in Angular state management?

267.What are the core concepts of NgRx Store?

268.What is the difference between NgRx and Services for state management?

269.What is the purpose of NgRx Effects?

270.What is the 'providedIn: root' best practice?

271.What is the OnPush strategy best practice?

272.How do you prevent memory leaks with RxJS?

273.What are naming conventions in Angular?

274.What is the feature module pattern?

275.What is the purpose of @angular/cdk?

276.What are zones and why are they being removed in newer Angular versions?

277.How do you optimize bundle size with tree-shaking?

278.What is differential loading?

279.How do you use Vercel for Angular deployment?

280.What is ng build --configuration production?

281.What is the purpose of polyfills.ts?

282.How do you manage cross-site request forgery (CSRF) in Angular?

283.What is the difference between a Template and a View?

284.What is host binding and host listening?

285.What is the purpose of the 'shared' folder?

286.What is the purpose of the 'core' folder?

287.Explain 'Smart' vs 'Dumb' components in simple terms.

288.What is the purpose of an AppInitializer?

289.What is the difference between a Signal and an Observable?

290.What is a 'computable' signal?

291.What are the common causes of memory leaks in Angular?

292.What is the benefit of using standalone components?

293.How do you implement a custom structural directive?

294.What is the difference between @ViewChild and @ContentChild?

295.What is the role of the Angular compiler in production?

296.What is the difference between a pure and impure pipe?

297.How do you handle multiple slots in content projection?

298.What is the difference between a component and a directive?

299.How does Angular handle XSS protection?

300.What is the purpose of the DomSanitizer service?

301.What is the 'inject()' function in Angular?

302.Explain the difference between Promise and Observable.

303.What is the difference between Subject and BehaviorSubject?

304.What are Signal effects and when to use them?

305.What is the significance of 'providedIn: root'?

306.How do you test components with dependencies?

307.What is a 'trackBy' function in *ngFor?

308.What are feature modules and shared modules?

309.What is the role of Zone.js in Angular?

310.How do you structure an Angular project according to the Style Guide?