interview-questions

Angular

1. What are the building blocks of Angular?

2. What is the difference between one-way data flow and two-way data - binding?

3. What is the differentiate between Components and Directives?

Components break up the application into smaller parts; whereas, Directives add behavior to an existing DOM element.

4. What is the use of the @Input and @Output directives?

5. What are the Angular life-cycle hooks?

6. What is ng-content Directive?

7. What is ViewEncapsulation?

8. What are the differences between Observables and Promises?

9. Why do you like Angular?

10. What does this line do?

@HostBinding('class.valid') isValid;

Binds a host element property (here, the CSS class valid) to a directive/component property (isValid).

11. What is the difference between a smart/container/parent component and dumb/presentational/pure component? What is a good use case example? What are the advantages?

12. How do components communicate with each other?

Types of communication:

13. What is virtual DOM?

Virtual DOM is about avoiding unnecessary changes to the DOM, which are expensive performance-wise, because changes to the DOM usually cause re-rendering of the page. Virtual DOM also allows to collect several changes to be applied at once, so not every single change causes a re-render, but instead re-rendering only happens once after a set of changes was applied to the DOM.

14. What is Shadow DOM?

15. What is Reactive Programming?