టాప్ 100 Angular ఇంటర్వ్యూ ప్రశ్నలు – తెలుగు
భాగం 1: ప్రశ్నలు 1–25
Angular Basics (Angular యొక్క ప్రాథమిక అంశాలు)
1. Angular అంటే ఏమిటి?
సమాధానం:
Angular అనేది Google అభివృద్ధి చేసిన TypeScript ఆధారిత Open Source Web Application Framework. ఇది ప్రధానంగా Dynamic Single Page Applications (SPA) అభివృద్ధి చేయడానికి ఉపయోగించబడుతుంది.
2. Angular యొక్క ముఖ్యమైన Features ఏమిటి?
సమాధానం:
- Component-Based Architecture
- Dependency Injection (DI)
- Two-Way Data Binding
- Routing
- RxJS ద్వారా Reactive Programming
- Built-in Form Handling
- Lazy Loading
- Server-Side Rendering (SSR)
3. AngularJS మరియు Angular మధ్య తేడా ఏమిటి?
| AngularJS | Angular |
|---|---|
| JavaScript ఆధారితం | TypeScript ఆధారితం |
| MVC Architecture | Component-Based Architecture |
| Controllers ఉపయోగిస్తుంది | Components ఉపయోగిస్తుంది |
| పనితీరు తక్కువ | మెరుగైన పనితీరు |
| Mobile Support పరిమితం | Mobile Friendly |
4. Component అంటే ఏమిటి?
సమాధానం:
Component అనేది Angular Application యొక్క ప్రాథమిక నిర్మాణ భాగం (Building Block). ఇది User Interface (UI) లోని ఒక భాగాన్ని నియంత్రిస్తుంది మరియు అందులో HTML, CSS, TypeScript కోడ్ ఉంటాయి.
5. Module అంటే ఏమిటి?
సమాధానం:
Module అనేది సంబంధిత Components, Directives, Pipes మరియు Services ను ఒకే చోట సమూహంగా నిర్వహించే నిర్మాణం. దీని వల్ల Application నిర్వహణ సులభమవుతుంది.
Components మరియు Lifecycle Hooks
6. Angular Lifecycle Hooks అంటే ఏమిటి?
సమాధానం:
Lifecycle Hooks అనేవి Component జీవితచక్రంలో (Lifecycle) వివిధ దశలలో Angular స్వయంగా పిలిచే ప్రత్యేక Methods.
ప్రధాన Hooks:
- ngOnInit()
- ngOnChanges()
- ngDoCheck()
- ngAfterViewInit()
- ngAfterContentInit()
- ngOnDestroy()
7. ngOnInit() అంటే ఏమిటి?
సమాధానం:
Component Properties ప్రారంభమైన తర్వాత ఒక్కసారి మాత్రమే Angular ngOnInit() Method ను పిలుస్తుంది. ప్రారంభ Initialization Logic ఇక్కడ వ్రాస్తారు.
8. Constructor మరియు ngOnInit() మధ్య తేడా ఏమిటి?
| Constructor | ngOnInit() |
|---|---|
| Dependency Injection కోసం | Initialization Logic కోసం |
| Lifecycle ప్రారంభానికి ముందు పిలుస్తుంది | Component Initialize అయిన తరువాత పిలుస్తుంది |
9. ngOnDestroy() అంటే ఏమిటి?
సమాధానం:
Component తొలగించబడే సమయంలో Cleanup Operations చేయడానికి ఉపయోగిస్తారు.
ఉదాహరణలు:
- Observables నుండి Unsubscribe చేయడం
- Event Listeners తొలగించడం
- Memory Leaks నివారించడం
10. View Encapsulation అంటే ఏమిటి?
సమాధానం:
Component Styles DOM పై ఎలా ప్రభావం చూపాలో నియంత్రించే విధానాన్ని View Encapsulation అంటారు.
రకాలు:
- Emulated (Default)
- ShadowDom
- None
Data Binding
11. Data Binding అంటే ఏమిటి?
సమాధానం:
Component మరియు View మధ్య డేటాను సమకాలీకరించే (Synchronize) ప్రక్రియను Data Binding అంటారు.
12. Data Binding రకాలు ఏమిటి?
- Interpolation
- Property Binding
- Event Binding
- Two-Way Data Binding
13. Interpolation అంటే ఏమిటి?
<h1>{{ title }}</h1>
Component లోని Data ను HTML Template లో చూపించడానికి ఉపయోగిస్తారు.
14. Property Binding అంటే ఏమిటి?
<img [src]="imageUrl">
DOM Properties కు Component Data ను Bind చేయడానికి ఉపయోగిస్తారు.
15. Event Binding అంటే ఏమిటి?
<button (click)="save()">
User Events (Click, Change మొదలైనవి) ను Handle చేయడానికి ఉపయోగిస్తారు.
16. Two-Way Data Binding అంటే ఏమిటి?
<input [(ngModel)]="username">
Data Component నుండి View కి, View నుండి Component కి రెండు దిశలలో ప్రవహిస్తుంది.
Directives
17. Directives అంటే ఏమిటి?
సమాధానం:
Directives HTML యొక్క సామర్థ్యాన్ని విస్తరించి, Elements యొక్క ప్రవర్తన లేదా నిర్మాణాన్ని నియంత్రించడానికి ఉపయోగిస్తారు.
18. Directives రకాలు ఏమిటి?
- Component Directives
- Structural Directives
- Attribute Directives
*19. ngIf అంటే ఏమిటి?
<div *ngIf="isLoggedIn">
Condition నిజమైతే మాత్రమే HTML Element ను చూపిస్తుంది.
*20. ngFor అంటే ఏమిటి?
<li *ngFor="let user of users">
Collection లోని ప్రతి Item కోసం Loop నడిపి HTML Elements ను సృష్టిస్తుంది.
21. trackBy అంటే ఏమిటి?
సమాధానం:
ngFor ఉపయోగించినప్పుడు Rendering Performance ను మెరుగుపరచడానికి trackBy ఉపయోగిస్తారు. ఇది మారిన Elements మాత్రమే Update చేస్తుంది.
22. ngClass అంటే ఏమిటి?
సమాధానం:
HTML Elements కు CSS Classes ను Dynamic గా Apply చేయడానికి ఉపయోగిస్తారు.
23. ngStyle అంటే ఏమిటి?
సమాధానం:
HTML Elements కు Inline CSS Styles ను Dynamic గా Apply చేయడానికి ఉపయోగిస్తారు.
24. Custom Directive ఎలా సృష్టించాలి?
Angular CLI Command:
ng generate directive directive-name
ఈ Command ద్వారా కొత్త Custom Directive సృష్టించవచ్చు.
25. Structural Directives మరియు Attribute Directives మధ్య తేడా ఏమిటి?
| Structural Directive | Attribute Directive |
|---|---|
| DOM యొక్క నిర్మాణాన్ని మార్చుతుంది | Element యొక్క ప్రవర్తన లేదా రూపాన్ని మార్చుతుంది |
| ఉదా: *ngIf, *ngFor | ఉదా: ngClass, ngStyle |
ప్రతి ప్రశ్నకు తెలుగులో వివరణ, సులభమైన ఉదాహరణలు, మరియు ఇంటర్వ్యూలో చెప్పాల్సిన ముఖ్యాంశాలుతో కొనసాగిస్తాను. తర్వాత భాగం 2 (ప్రశ్నలు 26–50)
