https://github.com/maia14/angular-questions
Angular interview questions
https://github.com/maia14/angular-questions
angular interview-questions interviews javascript rxjs typescript
Last synced: about 2 months ago
JSON representation
Angular interview questions
- Host: GitHub
- URL: https://github.com/maia14/angular-questions
- Owner: MaiA14
- Created: 2020-10-16T13:47:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-16T13:48:43.000Z (over 5 years ago)
- Last Synced: 2025-02-22T04:41:09.969Z (over 1 year ago)
- Topics: angular, interview-questions, interviews, javascript, rxjs, typescript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular questions
1) **What are the advantages of typescript? give examples to features in ts.**
- Code scalability with “Interface oriented development”
- TypeScript helps you dealing with growing teams.
- Types have a proven ability to enhance code quality and understandability.\
features: interefaces.
2) **What is async pipe?**\
The async pipe subscribes to an Observable or Promise and returns the latest value it has emitted. When a new value is emitted, the async pipe marks the component to be
checked for changes. When the component gets destroyed, the async pipe unsubscribes automatically to avoid potential memory leaks.
3) **What is the difference between Subject and BehaviorSubject?**\
A BehaviorSubject holds one value. When it is subscribed it emits the value immediately. A Subject doesn't hold a value.
4) **What is change detection?**\
Angular includes a mechanism that detects change detection loops. In development mode, the framework runs change detection twice to check if the value has changed since
the first run. In production mode change detection is only run once to have a better performance.
5) **What is the difference between switchmap and mergemap?**\
switchMap cancels previous HTTP requests that are still in progress, while mergeMap lets all of them finish.