Professional Documents
Culture Documents
FE Interview Questions
FE Interview Questions
Typescript
What are the primitive types in TypeScript?
What is any type, and when to use it?
Explain how enums work in TypeScript?
What is the typeof operator? How is it used in TypeScript?
Explain the TypeScript class.
Provide the syntax for optional parameters in TypeScript.
What is the purpose of the tsconfig.json file?
What is an interface?
What are the ‘implements’ clauses in TypeScript?
Explain the concept of inheritance in TypeScript.
How many classes we can write in a single .ts file?
Explain inheritence property in Typescript.
What are differences between method overloading and method overriding?
What is interface in Typescript?
Explain the various ways to control member visibility in TypeScript.
Angular
Why Angular is called as Single Page Application?
What are the key components of Angular?
How to install Angular?
What are directives in Angular? Explain its types.
Explain lifecycle hooks in Angular?
What is the difference between constructor and ngOnInit?
Explain data sharing methods in angular.
What is dependency injection in Angular?
What is a custom pipe?
What are observables?
What is HttpClient and its benefits?
What is RxJS library? How it can be used in Angular?
What are the router imports?
What are differences between RouterModule.forRoot() and RouterModule.forChlid()?
What are different types of compilation in Angular?
What Is Package.json? Explain its Purpose.
What is the use of interceptors?
Expain single page application concept in Angular.
Explain lazy loading concept in Angular.
Explain data binding concept of Angular.
JIT vs AOT compilation in Angular.
What are forms and types of forms in Angular?
Diffrentiate between Reactive forms and Template driven forms in Angular.
Difference between form control and form group.
What are pure and impure pipes in Angular.
Explain advantage of using async pipe.
Explain concept of Wildcard routes with its symbol.
What is service worker and its role in Angular.
Explain AuthGuard in Angular? When it is required?
Diffrence between promises and observables?
Explain in brief about RXJS operators: map(), switchMap(), fromEvent(), take(), pipe(), retry(), mergeMap(), filter(), concat
What is JSON and explain usecase.
Result of: console.log(num1 > num2 ? text1 === text2 ? 'India' : 'United States' : text1 != text2 ? 'Success' : 'Failed');
var arr1 = [1, 2, 3, 4, 5]; Create a new array with values which is greater than 2 using Javascript Array methods.
HTML / CSS
What are Attributes and how do you use them?
Explain the layout of HTML..
What is an opacity .
What is the hierarchy that is being followed when it comes to style sheets?
What is Cell Spacing and Cell Padding?
What is box model ?
Give some name of new tags introduced in HTML5.
1
1
1
What are decorators in Angular?
Decorators are a design pattern or functions that define how Angular features work. They are
used to make prior modifications to a class, service, or filter. Angular supports four types of
decorators, they are:
Class Decorators
Property Decorators
Method Decorators
Parameter Decorators
By default, all pipes are pure. However, you can specify impure pipes using the pure property, as
shown below.
@Pipe({
name: 'demopipe',
pure : true/false
})
What is an ngModule?
NgModules are containers that reserve a block of code to an application domain or a workflow.
@NgModule takes a metadata object that generally describes the way to compile the template
of a component and to generate an injector at runtime. In addition, it identifies the module's
components, directives, and pipes, making some of them public, through the export property so
that external components can use them.
What are Promises and Observables in Angular?
While both the concepts deal with Asynchronous events in Angular, Promises handle one such
event at a time while observables handle a sequence of events over some time.
Promises - They emit a single value at a time. They execute immediately after creation and are
not cancellable. They are Push errors to the child promises.
Observables - They are only executed when subscribed to them using the subscribe() method.
They emit multiple values over a period of time. They help perform operations like forEach, filter,
and retry, among others. They deliver errors to the subscribers. When the unsubscribe() method
is called, the listener stops receiving further values.
Lazy loading dynamically loads the feature modules when there's a demand. This makes the
application faster. It is used for bigger applications where all the modules are not required at the
start of the application.
Sometimes, the interviewer will check what else we know about it? Why can’t we put the
services or logics in constructors?
The simple answer is that sometimes, we need to wait until all dependencies get loaded; or for
parent/child components, we might need to wait until the component is loaded. That’s why it’s
preferable to write the logic in ngOnInit.