Top 42 Angular Interview Questions

Angular is a TypeScript-based open-source full-stack web application framework led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS.




Pipe is another building block in Angular. We use Pipes to format data.

Below are some built-in Pipes:

  1. Uppercase
  2. Lowercase
  3. Decimal
  4. Currency
  5. Percent

We can also create Custom Pipes to format the data according to our need.







Answer will be published soon.


Few examples like:

  1. ng generate component component-name
  2. ng generate interface interface-name
  3. ng generate service service-name


Answer will be published soon.


Answer will be published soon.


Answer will be published soon.


Answer will be published soon.


The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code. Compiling your application during the build process provides a faster rendering in the browser. Angular offers two ways to compile your application: Just-in-Time (JIT), which compiles your app in the browser at runtime. Ahead-of-Time (AOT), which compiles your app at build time. JIT compilation is the default when you run the ng build (build only) or ng serve (build and serve locally) CLI commands: For AOT compilation, include the --aot option with the ng build or ng serve command: ng build –aot ng serve --aot


We can consider below points for better performance:

  1. Consider AOT compilation.
  2. Consider lazy loading instead of fully bundled app if the app size is more.
  3. your application is bundled and disfeatured.
  4. your application doesn’t have un-necessary import statements.
  5. your application’s 3rd party unused library. If exist and not used, removed from your application.
  6. Remove your application dependencies if not required.


There are some basic guidelines to mitigate the security risks. 1. Consider using AOT compilation. 2. Try to avoid using or injecting dynamic HTML content to your component. 3. Try to avoid using external URLs if not trusted. 4. Try to prevent XSRF attack by restricting the REST APIs.