SlideShare a Scribd company logo
Quick Answers to
ANGULAR
Interview Questions
QUICK ANSWERS
Here are some answers to common Angular interview
questions. That's Angular 2+, not AngularJS.
They’re quick, not really extended and are not in any
particular order. Let’s get it on!
Answer:
A Web Client Side framework that runs on Typescript.
1) What's Angular?
Answer:
Modules, Components, Templates, Directives, Data Binding,
Services, Dependency Injection & Routing
2) Which are the Angular Building Blocks?
Answer:
Compiling from TypeScript to Javascript
3) What's transpiling?
Answer:
ngOnChanges
4) Which execution component triggers on data-bound
input updates?
Answer:
A Component is a web application small part. A Directive
adds functionality to a DOM element.
5) What's the difference between Components and
Directives?
Answer:
A Directive to pass data to a child component.
6) What's the @Input decorator?
Answer:
A Directive to set an event to which a parent component can
subscribe.
7) What's the @Output decorator?
Answer:
It's a Directive to put some html content inside DOM
element.
8) What's ng-content?
Answer:
A method in the Router service that allow us to navigate to
component in a Single-Page-Application.
9) What's router.navigate?
Answer:
A method to encapsulate styles in a component, and has
three types: Emulated to allow other's components styles,
Native to ignore other component's styles and None to allow
other's components visibility.
10) Wha'ts ViewEncapsulation?
Answer:
A shared clas, code that we can use across components.
11) What's a Service
Answer:
It's a pattern that allow us to provide dependencies during
runtime asking rather than creating. It's a way to instance
once and pass by reference in any other call.
12) What's Dependency Injection?
Answer:
It's a way to emulate navigation in SPA's.
13) What's Routing?
Answer:
It's a Directive that allow us to render the components at an
specific location.
14) What's a RouterOutlet?
Answer:
With (event)="method()" Directive to route the event to a TS
method.
15) How to handle Events?
Answer:
String Interpotation: The content between the double curly
brackets is evaluated and the result replaces the string.
16) What's {{}}?
Answer:
Property, Event, Two Way & String Interpolation.
17) Which are the DataBinding types?
Answer:
OnChange -> OnInit ->DoCheck -> AfterContentInit ->
AfterContentChecked -> AfterViewInit -> AfterViewChecked ->
OnDestroy.
18) What's the Life-cycle Hooks sequence?
Answer:
It's a dependencies & configuration file that contains
information about the current package, its dependencies
and their versions
19) What's package.json?
Answer:
A Single-Page-Application, an entire application in a single
html page using javascript to emulate navigation and to
content the whole app logic.
20) What's a SPA?
Answer:
It's a small part of the application, an HTML block able to be
bound to data.
21) What's a Component?
Answer:
It's a directive for two-way data binding.
22) What's NgModel?
Answer:
It's a method for subscription to an event, in order to trigger
a function when it happens.
23) What's subscribe?
Answer:
Observables are lazy, they wait till the events occurs and can
handle may subscriptions. Promises are eager, immediatly
executes and handle a single event.
24) What's the difference between Observables &
Promises?
Answer:
It's a Directive that allow us to bind data asynchronously in a
string interpolation, using a Promise or Observable directly
instead of a property or variable.
25) What's an AsyncPipe?
Answer:
It's using an API on the server side to validate credentials
and return a JWT.
26) What's authentication?
Answer:
It's validating access to components or specific data for a
specific user in the client side application.
27) What's authorization?
Answer:
It's compiling typescript and html files into Javascript on
build time.
28) What's AOT compilation?
Answer:
It's a library that uses the Store pattern to access global data
client side in the application.
29) What's Redux?
Answer:
Directives that allow us to format the result in a String
Interpolation.
30) What's pipes?
Answer:
ngClass loads a css class, ngStyle sets css styles.
31) What's the difference between ngClass and ngStyle?
Answer:
Functions that allow a building block to be configured before
to be used, adding metadata to the object.
32) What's a decorator?
Answer:
The equivalent to the arguments object in Javascript to
handle the arguments array.
33) What's a rest parameter?
Answer:
*ngFor="let item of collection"
34) What's the ngFor syntax?
Answer:
FormsModule
35) What's the ngModel module?
Answer:
ReactiveFormsModule
36) What's the ReactiveForms module?
Answer:
ReactiveFormsModule
36) What's the ReactiveForms module?
Answer:
e = new EventEmitter<type>();
37) How to define custom event?
Answer:
A Decorator to access HTML element alias in a component
38) What's @ViewChild?
Answer:
Template Driven uses two-way data binding, automatic track
of data while Reactive Forms is event based.
39) Difference between Template Driven Forms &
ReactiveForms?
Answer:
Validator are pre-build functions to handle form validations
like min, max, required, etc.
40) What's Validators?
Answer:
A Provider is a Service.
41) What's a Provider?
Answer:
It's a method that returns an NgModule and its provider
dependencies.
42) What's 'forRoot'?
Answer:
It's a way to not load every module at once, but on demand,
using 'loadChildren' instead of 'component' in routing.
43) What's Lazy Loading?
Answer:
A function's parameter that may not be specified when
calling the function.
44) What's an optional parameter?
Answer:
It's Javascript runtime environment, able to run Javascript
browserless, as an interpreter.
45) What's NodeJS?
Answer:
It's package manager for NodeJS, able to install and manage
dependencies for Javascript projects.
46) What's NPM?
Answer:
It's the module bundler used by angular.
47) What's Webpack?
Answer:
Create, Render, Create and Render childs, Check databoubd
changes & re-render & destroy.
48) What's Angular Component Life Cycle?
Answer:
It's an object that represents the data emitted by an event.
49) What's $event?
Answer:
A Decorator to describe a module.
50) What's NgModule?
Answer:
It's a hook, a function trigger for a specific moment, ngOnInit
happens after first display of data-bound properties and
setup of directives.
51) What's ngOnInit?
Answer:
Unit testing validate isolated pieces of code & E2E validate
an integrated set of components.
52) Difference between Unit & E2E testing
Answer:
On Unit testing.
53) When to use test doubles?
Answer:
Model-View-Controller pattern separates data, UI and logic in
different pieces of code, the controller populates data ad
pass it to the view for the user.
54) Explain MVC
Answer:
Reactive interface, faster integration, concern separation,
modular client server independent.
55) Which are the MVC benefits?
Answer:
template, templateUrl, selector, styles, stylesUrls, animation,
interpolation, inputs, outputs, providers.
56) Which are some component decorator options?
THANKS!
I am Luis Espino
I am here because I love to spread knowledge.
I wish this info will help you. You can find me at
@espino316. Checkout my projects at luis.espino.info

More Related Content

PPTX
Angular vs react
PPTX
Angular interview questions
DOCX
Angular Interview Questions & Answers
PPTX
Angular tutorial
PDF
Html5 Interview Questions & Answers
PPTX
Angular 2.0
PPTX
Angularj2.0
PPTX
Angular 2
Angular vs react
Angular interview questions
Angular Interview Questions & Answers
Angular tutorial
Html5 Interview Questions & Answers
Angular 2.0
Angularj2.0
Angular 2

What's hot (20)

ODP
Java Concurrent
PPTX
Angular jS Introduction by Google
 
PPTX
React workshop
PPTX
React workshop presentation
ODP
Introduction to ReactJS
PDF
Spring Framework
PPTX
Angular vs. AngularJS: A Complete Comparison Guide
PPT
Google Guice
PPTX
Intro to React
PPTX
Introduction to Ibatis by Rohit
PPTX
Introduction to React JS for beginners | Namespace IT
PDF
Jug Guice Presentation
PPTX
Spring MVC framework
PPTX
Spring Framework Rohit
PDF
Modular JavaScript in an OSGi World - S Mak
PDF
Android MvRx Framework 介紹
PPT
Servlet programming
PDF
Spring framework core
PPTX
Angular vs. React
PPTX
Introduction to Spring Framework
 
Java Concurrent
Angular jS Introduction by Google
 
React workshop
React workshop presentation
Introduction to ReactJS
Spring Framework
Angular vs. AngularJS: A Complete Comparison Guide
Google Guice
Intro to React
Introduction to Ibatis by Rohit
Introduction to React JS for beginners | Namespace IT
Jug Guice Presentation
Spring MVC framework
Spring Framework Rohit
Modular JavaScript in an OSGi World - S Mak
Android MvRx Framework 介紹
Servlet programming
Spring framework core
Angular vs. React
Introduction to Spring Framework
 
Ad

Similar to Quick answers to Angular2+ Interview Questions (20)

DOCX
Angular.js interview questions
PDF
50 common web developer interview questions [2020 updated] [www.full stack....
PDF
Best interview questions
DOCX
node.js interview questions and answers.
PDF
Backend Development Bootcamp - Node [Online & Offline] In Bangla
PDF
Full Stack React Workshop [CSSC x GDSC]
PPTX
Angular js workshop
PDF
Node.JS Interview Questions .pdf
PPTX
Reactive Programming on Android - RxAndroid - RxJava
PDF
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
PDF
Top 40 Javascript Interview Questions and Answers.pdf
PPTX
Django Frequently Asked Interview Questions
PDF
Asp net interview_questions
PDF
Asp net interview_questions
PDF
Beginning MEAN Stack
PDF
Nt1310 Unit 3 Language Analysis
PPTX
Framework engineering JCO 2011
PPT
Gnizr Architecture (for developers)
PDF
JavaScript Interview Questions with Answers
Angular.js interview questions
50 common web developer interview questions [2020 updated] [www.full stack....
Best interview questions
node.js interview questions and answers.
Backend Development Bootcamp - Node [Online & Offline] In Bangla
Full Stack React Workshop [CSSC x GDSC]
Angular js workshop
Node.JS Interview Questions .pdf
Reactive Programming on Android - RxAndroid - RxJava
Dicoding Developer Coaching #31: Android | Menerapkan Clean Architecture di A...
Top 40 Javascript Interview Questions and Answers.pdf
Django Frequently Asked Interview Questions
Asp net interview_questions
Asp net interview_questions
Beginning MEAN Stack
Nt1310 Unit 3 Language Analysis
Framework engineering JCO 2011
Gnizr Architecture (for developers)
JavaScript Interview Questions with Answers
Ad

More from Luis Martín Espino Rivera (7)

PDF
Counting valleys from Hackerrank solution explained
PDF
Los principios y la alegria de programar
PDF
Lo que debes saber antes de iniciar un negocio por internet... Técnologicamen...
PDF
High Performance Organization Culture Proposal
PDF
MeritocraciaYA Cultura Organizacional Ciudadana
PDF
10 cosas que debes saber para contratar a un diseñador web
PPTX
Exportar información de Sql Server a Excel
Counting valleys from Hackerrank solution explained
Los principios y la alegria de programar
Lo que debes saber antes de iniciar un negocio por internet... Técnologicamen...
High Performance Organization Culture Proposal
MeritocraciaYA Cultura Organizacional Ciudadana
10 cosas que debes saber para contratar a un diseñador web
Exportar información de Sql Server a Excel

Recently uploaded (20)

PDF
AI in Product Development-omnex systems
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPT
JAVA ppt tutorial basics to learn java programming
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
5 Lead Qualification Frameworks Every Sales Team Should Use
PDF
Understanding Forklifts - TECH EHS Solution
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
AI in Product Development-omnex systems
2025 Textile ERP Trends: SAP, Odoo & Oracle
Odoo POS Development Services by CandidRoot Solutions
JAVA ppt tutorial basics to learn java programming
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
Softaken Excel to vCard Converter Software.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
The Five Best AI Cover Tools in 2025.docx
PTS Company Brochure 2025 (1).pdf.......
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
5 Lead Qualification Frameworks Every Sales Team Should Use
Understanding Forklifts - TECH EHS Solution
A REACT POMODORO TIMER WEB APPLICATION.pdf
L1 - Introduction to python Backend.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

Quick answers to Angular2+ Interview Questions