
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialWeb Development
4.7 Rating 65 Questions 30 mins read7 Readers

Angular is an open-source Web Development Framework written in Typescript. Angular is developed and maintained by Google. It is used for the development of Single Page Applications. Angular also has a large number of libraries that are open source and can be used within the Angular framework for building complex applications.
Angular uses TypeScript, which is a superscript of JavaScript. Typescript enables us to write JavaScript as a strong type of language that helps to identify and debug errors easily.
Angular is a modern web development framework that has various advantages over its predecessors
Client-side rendering
Angular Applications are rendered on the user's browser unlike other traditional web development frameworks where every page was requested from the server and then it was loaded into the browser. Due Client side rendering Angular applications are much faster than traditional web development frameworks.
Single Page Application
Applications developed using Angular are Single Page Applications i.e. the whole app does not requires to be loaded into the browser, only the page or module the user is currently interacting with is required to be loaded into the browser that makes Angular Applications faster and Lightweight.
Excellent material Design Library
Angular comes with Angular Material Design Library that allows designing of the UI/UX of the Application much faster and makes it more attractive and intractable. Angular material also has various templates available on Angular community forums that can be readily used to kick start the Angular Projects with design templates.
Strong and Growing Community
Angular has a strong community of developers that can be leveraged in case if developer is stuck and need help for any of the issues/challenges they face during development/maintenance of the application. Also, there are numerous tutorials that are easily available on the internet to learn Angular.
Scalable and maintainable Architecture
Unlike Traditional Web Development Frameworks, Angular Application is divided into various components, modules, services, routes that are easy to maintain and scale up as and when required.
Angular is used for building a wide variety of Web/Mobile Applications, few of the use cases of Angular are:
Building Large Enterprise Applications
Angular 8 can be efficient for building large and complex Web Applications that cater the needs of a specific industry and run their businesses through these applications like CMS and LMS apps, Travel and Holiday Booking Apps, Social Media Sites, Content Publication Portals, E-Commerce Apps etc.
Progressive Web Applications (PWA)
Angular can be used to Build PWA, A progressive web app (PWA) is a website that looks and behaves as if it is a mobile app. PWAs are built to take advantage of native mobile device features, without requiring the end user to visit an app store, make a purchase and download software locally. Instead, a PWA can be accessed immediately through a browser. PWAs eliminate the need for e-commerce merchants to develop native apps for multiple mobile operating systems.
Migrating old legacy Application to Modern Framework
Applications built on technologies that are outdated need to be upgraded and migrated to a newer framework to fit the need of modern users and to leverage the advantage of modern technologies. Angular could be a perfect framework that can be used to migrate those old legacy platforms to a modern platform since Web API/Web services of those legacy applications can be entirely reused and just the front end needs to be built in Angular that will have better UI/UX and maintainability than the older application thus migrating legacy application to Angular saves a lot of time, cost and will provide better front end to the end users of the application.
A must-know for anyone heading into an Angular interview, this question is frequently asked in Angular 8 interview questions.
Document Object Model
The Document Object Model (DOM) is a programming interface for HTML and XML documents, DOM is rendered in the browser to display the UI. It represents a tree-like hierarchy for the structure of a document, with each node in the tree representing a part of the document (like an element, attribute, or text content).
The DOM enables developers to programmatically access and manipulate the style, content, and structure of a document, and is often used in web development to make dynamic updates to a webpage.
TypeScript
TypeScript is an open-source programming language developed and maintained by Microsoft. It is a superset of JavaScript and provides strict syntactical capabilities and adds optional static typing and other various features to the language.
TypeScript's type system allows better code refactoring and editor support, which can help developers catch errors before they reach runtime, this makes it an appealing choice for large-scale applications. It also includes a number of features from the latest versions of JavaScript, such as async/await, de-structuring, and spread operators.
Once code is written then it can be compiled into pure JavaScript that can be run in any browser or JavaScript runtime environment. It is widely used in Angular web frameworks and other JavaScript frameworks.
Data Binding
Data binding is a feature in Angular that allows you to create a connection between the component's template and the component's class (i.e .ts/.js file and .html file). Data Binding allows you to synchronize the data between the template and the class so that changes made in the template are reflected in the class, and vice versa. For the bidirectional data flow, Angular provides two-way data binding which can be achieved by using the Ng Model directive along with property and event binding.
Testing
Angular provides a powerful and comprehensive testing infrastructure that allows you to test different parts of your application even before making your application live or completely runnable. You can test components, services, pipes, and directives. The Angular CLI can generate a boilerplate code for you to test your component with a command. Additionally, Angular also has its own testing framework called Jasmine, along with the Karma test runner that runs the test in the browser and Protractor for E2E testing.
Every application has at least one Angular module, the root module that we bootstrap to launch the application is called a bootstrapping module. It is commonly known as AppModule. The default structure of AppModule generated by AngularCLI would be as follows,
import { BrowserModule } from '@Angular/platform-browser';
import { NgModule } from '@Angular/core';
import { FormsModule } from '@Angular/forms';
import { HttpClientModule } from '@Angular/common/http';
import { AppComponent } from './app.component';
/* the AppModule class with the @NgModule decorator */
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
One of the most frequently posed Angular 8 Interview Questions, be ready for it. Passing the data between the components is Component data communication. Component data communication is mainly of two types i.e Parent to Child and Child to Parent
Parent to Child:
Parent to child data sharing passes data from the parent component to the child component with the help of @Input Decorator()
Child to Parent:
Passing data from child to parent component is Child to Parent data communication which is done using @Output() decorator
Here's the example of Parent to Child communication.
landing-page-component.ts
import { Component, OnInit } from '@Angular/core';
@Component({
selector: 'app-landing-page',
templateUrl: './landing-page.component.html',
styleUrls: ['./landing-page.component.css']
})
export class LandingPageComponent implements OnInit {
constructor() { }
studentMarks = [{subject: "Maths", score: 75}, {subject: "Science", score: 80}, {subject: "History", score: 50}];
myResult: any
ngOnInit(): void {
}
displayResult($event: any) {
this.myResult = $event;
}
}
landing-page-component.ts
<div>
<app-result-page [marks]="studentMarks" (emitresult)="displayResult($event)"></app-result-page>
<b>{{myResult}}</b>
</div>
result-page-component.ts
import { Component, Input, OnInit, Output, EventEmitter } from '@Angular/core';
@Component({
selector: 'app-result-page',
templateUrl: './result-page.component.html',
styleUrls: ['./result-page.component.css']
})
export class ResultPageComponent implements OnInit {
@Input() marks: any;
@Output() emitresult = new EventEmitter()
result: any;
constructor() { }
ngOnInit(): void {
console.log('YOUR MARKS ARE:', this.marks);
if (this.marks.filter((x: any) => x.score < 50).length > 0) {
this.result = 'You Failed';
} else {
this.result = 'You Passed';
}
this.emitresult.emit(this.result);
}
}
result-page-component.html
<div>
<div *ngFor= "let mark of marks">
{{mark.subject}} {{mark.score}}
</div>
</div>
Output:

We created two components namely LandingPage which is our Parent component and ResultPage which is Child component.
Firstly, we passed student marks from Landingpage to ResultPage i.e Parent to Child component using
[marks]="studentMarks"
In landing-page-component.html and accessing the value of studentMarks in result-page-component.ts via @Input() decorator
In result-page-component.ts we need to return the result whether the student is padded or failed to the parent component by checking if any score is less than 50 the student is failed else they are passed.
Once we get this result, we pass this on to the parent component i.e landing-page-component.ts via the @Output decorator and access the result in Parent component via function displayResult() in landing-page-component.ts which is triggered by landing-page-component.html by below event and store it in myResult variable
(emitresult)="displayResult($event)"
and finally, we display the result via interpolation
<b>{{myResult}}</b>
ngOnChanges() is a lifecycle hook in Angular that is called whenever a data-bound property value changes, it is used for change detection. The hook method is passed a SimpleChanges object that contains the current and previous property values. It is commonly used to update a component's internal state or perform some other action in response to a change in an input property. The ngOnChanges() method is called whenever a bound input property changes.
It uses SimpleChanges Object to get the latest changes in @Input(), we can see the previousValue and currentValue with the help of SimpleChanges object
Here's the example of ngOnChanges() lifecycle hook:
We have created a input control in InputComponent and stored the value of input control in a variable name. We pass this name as an @Input() to the child component i.e DisplayComponent, inside DisplayComponent we use ngOnChanges() LifeCycle hook to get the current and previous changes
input.component.ts
import { Component, OnInit, OnChanges } from '@Angular/core';
@Component({
selector: 'app-input',
templateUrl: './input.component.html',
styleUrls: ['./input.component.css']
})
export class InputComponent implements OnInit {
constructor() { }
name: string = "";
ngOnInit(): void {
}
updateName(text: any ) {
// console.log('updated name:',text.target.value);
this.name = text.target.value;
}
}
input.component.html
<div>
<p>Enter you name:</p>
<input type="text" (keyup)="updateName($event)">
<app-display [myName]="name"></app-display>
</div>
display.component.ts
import { Component, Input, OnInit, OnChanges, SimpleChanges, SimpleChange } from '@Angular/core';
@Component({
selector: 'app-display',
templateUrl: './display.component.html',
styleUrls: ['./display.component.css']
})
export class DisplayComponent implements OnInit {
@Input() myName : any
constructor() { }
ngOnInit(): void {
console.log('Input is:', this.myName);
}
ngOnChanges(changes: SimpleChanges) {
console.log(JSON.stringify(changes['myName']));
}
}


A promise is a JavaScript object that represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
Promises in Angular provide a way to handle asynchronous data and simplify the process of working with asynchronous code. A promise has one of three states: pending, fulfilled, or rejected. When a promise is pending, it means that the asynchronous operation has not yet completed.
When the operation completes successfully, the promise becomes fulfilled and its resulting value is made available. If the operation fails, the promise becomes rejected.
A promise can be "subscribed" to using the then() method, which takes two callback functions: one for handling the fulfilled case, and one for handling the rejected case.
In Angular, promises are commonly used to handle HTTP requests, as well as other asynchronous operations, such as timers and animations
Promises can be executed by calling the then() and catch() methods.
The then() method takes two callback functions as parameters and is invoked when a promise is either resolved or rejected.
The catch() method takes one callback function and is invoked when an error occurs.
Here's an example of a promise
async and await are keywords in JavaScript that allow developers to write asynchronous code that executes synchronously
async is a keyword that is used before a function declaration to indicate that the function contains asynchronous code. It tells the JavaScript interpreter that the function should return a promise.
await is a keyword that is used inside an async function to pause the execution of the function until a promise is fulfilled. When the await keyword is used with a promise, the JavaScript interpreter waits for the promise to resolve and then assigns the resolved value to the variable on the left of the await keyword.
Here's an example of async await keywords:
We create a funcA that returns a promise after 2 seconds and functB that is marked as async, inside funcB we await the function a to return the promise result, once result is returned, we console the result of funcA.
function funcA() { return new Promise((resolve,reject) => { setTimeout(() => { resolve('Promise resolved') }, 2000); }) } async function funcB() { var result = await funcA(); console.log(result); } funcB()
A staple in advanced Angular 8 interview questions, be prepared to answer this one. Pipes are used to transforming the way how information is visible to the user. Apart from built-in pipes Angular also gives us the provision to implement our own pipes, these customized pipes as per our need is called Custom pipes. Angular Pipes are TypeScript classes with the @Pipes decorator.
Here is an example of a pipes that display Pass or Fail beside the students subject if marks is greater than equal to 50 else Fail
result.pipe.ts import { Pipe, PipeTransform } from '@Angular/core'; @Pipe({ name: 'result' }) export class ResultPipe implements PipeTransform { transform(value: number): string { if (value >= 50) { return 'Pass' } else { return 'Fail' } } }
result-page.component.html
<div> <div *ngFor= "let mark of marks"> {{mark.subject}} {{mark.score | result}} </div> </div>
Output:
In Angular, a pipe is a way to transform data before displaying it in a template. Some pipes, called "parameterized pipes," take an additional parameter as input in order to control their behavior.
A parameterized pipe is defined by using the : character followed by the parameter value, for example {{value | myPipe:parameter}}
Let us take an example where we need to pass parameter with a date pipe.
<p>Full Date : {{today | date:'fullDate'}}</p>
Here date is Angular pipe and 'fullDate' is the parameter that we pass to the date pipe
In our pipe.ts file we can access the argument as:
transform(value: number, param: string): string {
Where param is the argument you passed to pipe
Pipe chaining is a method of connecting the output of one pipe the input of another, in order to perform a series of operations on the data. This can be done by using the "pipe" symbol (|) in a command-line interface, which takes the output of the command before the symbol as the input of the command after the symbol. This allows multiple commands to be combined into a single, more powerful command Refer the example below:
<h2>Your result is - {{ marks | result | uppercase}} </h2>
we used custom pipe "result" and chained it with another pipe "uppercase", where result is a custom pipe and uppercase is inbuilt pipe.
Pure pipe is a pipe that runs only when a pure change is detected, by pure change we mean change in primitive datatypes like boolean, string, number or object reference change.
Impure pipes are pipes that runs when object is changed. Changes within objects, array will be detected by impure pipe.
Pipes are pure by default, to make the pipe impure we need to add pure: false inside the @Pipe() decorator.
import { Pipe, PipeTransform } from '@Angular/core';
@Pipe({
name: 'result',
pure: false
})
export class ResultPipe implements PipeTransform {
transform(value: number, param: any): string {
if (param.isPassed) {
return 'Pass'
} else {
return 'Fail'
}
}
}
Outgoing requests and incoming responses can be intercepted in Angular 8 using HTTP Interceptors. HTTP Interceptor sits between client and server; hence Interceptors have access to any http request made from client to the server and response from server to the client. Interceptors can also be used to modify the request object and response data.
We can create an interceptor by creating interceptor.ts file and adding the required dependencies as seen below
interceptor.ts
import {Injectable} from "@Angular/core"; import {HttpEvent, HttpHandler, HttpInterceptor,HttpRequest} from "@Angular/common/http"; import {Observable} from "rxjs"; import { tap } from "rxjs/operators"; @Injectable() export class AppHttpInterceptor implements HttpInterceptor { constructor() { } intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { console.log('request log:', req); return next.handle(req).pipe( tap( event => this.handleResponse(req, event), ) ) } handleResponse(req: HttpRequest<any>, event: any) { console.log('response log', req.url, event); } }
Add these dependencies in app.module.ts
import { NgModule } from '@Angular/core'; import { BrowserModule } from '@Angular/platform-browser'; import { AppComponent } from './app.component'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@Angular/common/http'; import { AppHttpInterceptor } from './interceptor'; @NgModule({ declarations: [ AppComponent, ], imports: [ BrowserModule, AppRoutingModule, HttpClientModule ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: AppHttpInterceptor, multi: true } ], bootstrap: [AppComponent] }) export class AppModule { }
We have added an api call using HttpClient module in AppComponent as seen below:
import { Component, OnInit } from '@Angular/core'; import { HttpClient } from '@Angular/common/http'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'IQA'; constructor (private http: HttpClient) { } ngOnInit() { this.http.get<any>('https://api.npms.io/v2/search?q=scope:Angular').subscribe(data => { console.log('data from api:', data); }) } }
Now when we run our app we can see that the request and response are been logged with the help of interceptor as seen below: