• Tutorials Logic, IN
  • +91 8092939553
  • info@tutorialslogic.com

Angular Interview Questions

1. What is Angular ?

Angular is a leading, powerful and most popular frontend javascript framework for creating single page application or SPA. With angular we can create mobile application, desktop applicaion as well as web application very quickly and easily. Angular is much faster and easier than its previous version angular js. Unlike angular js, angular is written in typescript.

2. What are the building blocks of Angular ?

The angular application is made using the Component, Modules, Template, Directives, Data Binding, Services, Dependency Injection, Routing.

3. What is the differentiate between components and directives ?

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

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

When we want to do communication of components, which are in parent-child-relationship then we use @Input in child component to pass data from parent to child component and @Output in child component to receive an event from child to parent component.

5. What is Transpiling in Angular ?

TypeScript is a superset of javascript and it is a primary language for creating angular application. As we know browser can not execute typescript directly, so it will be transpiled to javascript using the tsc complier.

6. What is Routing in Angular ?

Routing helps a user in navigating from one page to another page without reloading the page using router links.

7. In how many ways the Data Binding can be done ?

Data binding can be done in 3 different ways to bind HTML (template) and typescript (component), such as Property Binding, Event Binding, Two-Way Data Binding.

8. What is the purpose of using package.json in the angular ?

In angular package.json file will allow us to manage the various dependencies of the application at one place.

9. What is the actual sequence of angular lifecycle hooks ?

Lifecycle hooks of angular will be as per below order-
OnChange() => OnInit() => DoCheck() => AfterContentInit() => AfterContentChecked() => AfterViewInit() => AfterViewChecked() => OnDestroy().