Angular Interview Questions
=============
Beginners:
=============
Q. What is Angular?
Q. Explain few main features of Angular?
A.
- Offers clean code development
- Higher Performance
- Material Design-like Interface
- An angular framework can take care of routing which means moving from one view to another is easy
- Seamless Updates using Angular CLI
Q. Flow of Angular application?
Q. What is a life cycle hook and how many are there in Angular?
A. Every component in Angular has a lifecycle, different phases it goes through from the time of creation to the time it's destroyed. Angular provides 8-hooks to tap into these phases and trigger changes at specific phases in a lifecycle:
- ngOnChanges
- ngOnInit
- ngDoCheck
- ngAfterContentInit
- ngAfterContentChecked
- ngAfterViewInit
- ngAfterViewChecked
- ngOnDestroy
Q. Explain the differences between ngOnInit vs ngAfterContentInit vs ngAfterViewInit?
Q. Explain data-binding concept in Angular and how many types does Angular supports?
A.
Q. Difference between angular.json and package.json files?
Q. Difference between package.json and package.lock.json files?
Q. Difference between "npm" and "npx" commands?
Q. What are pipes? Types of built-in pipes used in Angular?
- DatePipe
- CurrencyPipe
- DecimalPipe
- JsonPipe
Q. What are directives in Angular?
Q. What are forms in Angular? Types supported?
Q. What is a local reference?
Q.
=============
Intermediate:
=============
Q. What is lazzy loading? How to achieve it in Angular?
Q. Difference between Observer and Observable?
Observable - is a wrapper around data source( stream of data source that continuously emits data over data ) .
Observer -
1. Observer is there to execute some piece of code whenever we receive some data, error or if observable reports that this is done.
2. Observer implements three methods next , error and complete
Subscription - Observer is connected to an observable through subscription
Each Subscription causes an independent execution of the observable.
How does Observable know that observer has only these three methods ?
- There is a contract between observer and observable so that Observable knows which method to call.
Q. Difference between template-driven vs reactive forms in Angular?
=============
Experts:
=============
Q. Explain the concept of Dependency Injection?
Q. What are Guards? Types of Guards supported in Angular?
Comments
Post a Comment