70 Best Angular 2 Interview Questions and Answers [Angular 2]

Basic Questions

What is Angular 2?
What are the fundamentals concepts of Angular 2?
What are advantages of Angular 2?
What are major changes in Angular 2?
What are the core components of Angular 2?
What set of modern browsers are supported in Angular 2?
What are differences between Angular 2 and Angular 1?
Can you write both Angular 1 and Angular 2 codes in a single project?
What are differences between Constructors and OnInit?
What did you like about working with Angular 2?
When will ngInit be called?
How would you make use of NgOnInit()?
What is the difference between NgOnInit() and constructor() of a component?
What is the possible order of life-cycle hooks?

ECMA Script and Typings Questions

What is ECMAScript ES5/ES6?
What is “ES6 +A”?
What is ECMAScript ES5/ES6?
What is “ES6 +A”?
What is Typings in Angular 2?
Why type definition with TypeScript in Angular 2?
Can I use Angular 2 with Typings in Angular 2?
Are Typescript type definitions Required?
Do we only need type definition files not “node_modules”?
How to create custom type definitions in Angular 2?
How to load file in your Angular 2 project?
Dynamic vs. Static Typing?
Traceur Compiler Questions

What is Traceur compiler? Why in Angular 2?

Components Questions

What is Components in Angular 2?
What are differences between Components and Directives?
What are Components Life-Cycles?
What is @Inputs in Angular 2?
What is Outputs in Angular 2?
What is hidden property in Angular 2?
How do components communicate with each other?
How would you create a component to display error messages throughout your application?
Directives Questions

What is Directives in Angular 2?
What is router-outlet directive in Angular 2?
What is a structural directive?
How do you identify a structural directive in html?
Template Questions

What is Template Angular 2?
What are differences between templateUrl and styleUrls?
When do you use template driven vs model driven forms? Why?
What is a template variable. How would you use it?
How can you add an active class to a selected element in a list component?
Styling Questions

How to import css using system import?
How to Load external css style into Angular 2?
How would you select a custom component to style it.
How would you select all the child components’ elements?
What selector force a style down through the child component tree into all the child component views?
What does the following css do?
What does :host-context() pseudo-class selector targets?
Routing Questions

What is RouteParams in Angular 2?
What is route config in Angular 2?
What is router-link directive in Angular 2?
When does a lazy loaded module is loaded?
Do you need a Routing Module? Why?
How does loadChildren property work?

State Management Questions

What are cookies in Angular 2?
How would you pass data from a parent component to a child component?
How would you pass data from a child component to a parent component?
Dependency Injection Questions

What is Dependency Injection (DI) in Angular 2?
API Questions

Why would you use renderer methods instead of using native element methods?
How would you control size of an element on resize of the window in a component?
Ng-Modules Questions

What is the purpose of NgModule??
How do you decide to create a new NgModule?
What would you have in a shared module?
What is the purpose of exports in a NgModule?
What is the difference between a module’s forRoot() and forChild() methods and why do you need it?

Services Questions

What is the use case of services?
How are the services injected to your application?
How do you unit test a service with a dependency?
Why is it a bad idea to create a new service in a component like the one below?
Pipes Questions

What is an async pipe?
Whrn you used with async pipe?
What is a pure pipe?

Leave a Reply

Your email address will not be published. Required fields are marked *