Angular Js 5 Interview Questions

Top Angular Js 5 Interview Questions

Angular Js is the most widely used web development framework which can used potentially for mobile apps and desktop applications development. Specially it can used for Hybrid (Cross Platform) mobile application development. It is developed by google developer team. Day by day it’s updating its version. 1,2,4,5,6.. on going.
Here you can get all type of questions which is frequently asked by Top MNC.Make sure before going to interview just brush up it once.

What Is AngularJS 5?

Its a advanced version of angularjs 4 which have some modifed features.
Angular Team keep trying to update this angular js. Angular 5 is realease in Oct 2017.
It a nothing but a typescript library which make specially develop mobile apps and desktop applications.

What are the additional features in angular js 5

1. Build-optimizer.
2. Compiler Improvements( Make AOT the default )
3. Angular Universal State Transfer
4. New Router Lifecycle Events
5. HttpClient
6. Improvement on XSRF Protection
7. Remove *.ngfactory.ts files
8. Type checking in templates
9. AppShell
10.Preserve Whitespace

How to update httpclient in Angular js 5?

You update the HTTPClient in 3 easy steps:
1. Replace HttpModule with Http Client Module from @angular/common/http.
2. Inject the HttpClient service
3. Remove any map(res =>res.json()) calls, which are not required no more.

What is the Built Optimizer in Angular js 5 ?

Objective of Built Optimizer is to reduce size of bundle to make better performance.
Its make smaller size of typescript file as well.

How Preserve Whitespace in Angular 5?

In previous version there is no restriction for whitespace,tabs while creating build, It comes unnecessarily. In angular 5 has the restrictions. just have a look below examples
Example: If you want to restrict from homepage component , then..

templateUrl: ‘demo.homepage.html’,

preserveWhitespaces: false


Example :
If you want to restrict from globally throughout the application then need to set piece of codeĀ in config.json file.

[SyntaxHL]”angularCompilerOptions”: {

“preserveWhitespaces”: false

What are the life Cycle event in angular 5?

In angular 5 updated 4 kind of event for Guards anD Resolve.
1) GuardsCheckStart,
2) GuardsCheckEnd,
3) ResolveStart and
4) ResolveEnd

What are the performance level updatations in angular 5?

1. It uses addEventListener for faster rendering.
2. Remove decorator DSL
3. Switch Angular to use Static-Injector instead of Reflective-Injector
4. Improvements on Lazy loading for Angular.
5. Improved Universal & AppShell Support in the CLI
6. UpdateOn Blur / Submit

What is i18N Pipes in Angular 5?

The i18n pipes that set of built-in functionality makes internationalization or changes based on location of date, number, currency. etc.

What is AOT in angular 5?

It stands for Ahead-of-Time. It’s a compiler which converts HTML and TypeScript code into executable JavaScript code during the build.

What is Just-in-Time (JIT) in angular 5?

It’s a compiler which converts HTML and TypeScript code into executable JavaScript code at runtime.

Why Compile with AOT is better in angular 5?

  1. Faster rendering
  2. Fewer asynchronous requests
  3. Smaller Angular framework download size
  4. Detect template errors earlier
  5. Better security

What are the security principle should be implemented at time of app building in angular 5?

1. Never use directly DOM APIs.
2. Enable Content Security Policy (CSP)
3. Preventing CSRF or XSRF attacks.
4. Use DOM Sanitizer.
5. Use the offline template compiler

Leave a Reply

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