Angular Interview Questions & Answers 💡 What is ng-template in Angular? ng-template is a template element that is used with structural directives like *ngIf, *ngFor, [ngSwitch], and custom directives that we create. So what happens here, Actually Angular converts the above structural directive to the below ng-template code: 💡 How can we manually use *ngIf […]

Read More →

Why Angular is a Preferred Choice ✔️ Framework is written in TypeScript Having a built-in TypeScript, Angular provides robust tools to create the client-side of web applications. ✔️ Single-page applications (SPAs) It’s time for SPA (single-page applications) and Angular does its best in that.When we run a web application on a browser and do not […]

Read More →

Angular Interview Questions & Answers 💡 What is property binding and attribute binding? ✔ Property binding in Angular helps you set values for properties of HTML elements or directives.In this example, src is the name of the element property. ✔ Attribute binding in Angular helps you set values for attributes directly. With attribute binding, you […]

Read More →

Web Application Security Best Practices Is Web development only writing codes that work and run successfully? Not true. It is also about writing code that is secure and safe from vulnerabilities.A number of common vulnerabilities are coming in web applications. Some of those are because of bad coding practices, irregularities in patching updates, misconfiguration of […]

Read More →

NgRx Top Interview Questions and Answers First I would like to thank the NgRx team for such a great library and for the nice documents. Below answers are taken by NgRx official doc.Go to Docs: https://ngrx.io/docs 💡 What is NgRx? NgRx is a library for building reactive applications in Angular, inspired by Redux, a very […]

Read More →

Tips to Boost Angular App Performance ✔ Stop unwanted Change detections By default, components in an Angular application runs change detection for every user interaction. We can use ChangeDetectionStrategy.OnPush in the @Component decorator. This tells Angular to run change detection only if an input has changed, and that all of the inputs can be considered […]

Read More →

Angular NgModule AOT and DI ✋ What is an alternative to the @Input and @Output decorator? inputs and outputs selectors in component decorator are another way to define input and output properties, If we do like this we don’t need to import @Input and @Output. inputs: [‘name’, ’empId’],outputs: [‘changeName’, ‘updateId’] ✋ What are all types […]

Read More →

Angular Dependency Injection Provider The Angular Dependency Injection provides several types of providers. Class Provider : useClass Value Provider: useValue Factory Provider: useFactory Aliased Class Provider: useExisting useClass Provider when you want to provide another class with your provider DI Token then we use useClass class provider. This may be an instance of the same […]

Read More →

Rx JS Top Operators with examples Let’s start operators with definition and examples: ✋ from operator Turn an array, promise, or iterable into an observable. 💡 This operator can be used to convert a promise to an observable! 💡 For arrays and iterables, all contained values will be emitted as a sequence! 💡 This operator […]

Read More →

What’s new in Angular 9 Angular 9 release completely switches an angular application to a new fast reliable and performance-oriented compiler by default that is IVY. Angular 9 also introduced improved ways of testing components. How to update to version 9 As per Angular official… ✋ To have the best update experience, we recommend you […]

Read More →

What’s new in Angular 8 Angular is one of the most popular and awesome Javascript frameworks for Web and Mobile Application development. And now Angular has finally released it’s latest “Angular 8” on 23-May-2019. This release of Angular is packed up with many attractive features that made Angular 8 unique compared to its previous versions. […]

Read More →

Prime NG Row Group with Subheader Table – RowGroup It is easy to implement row grouping using the flexible template-driven approach of the p-table. In this example, sorting is enabled by default to sort the data by brand initially and then a rowGroupMetadata object is created to represent how many rows a brand should span along […]

Read More →

How to implement Reactive Form with Prime NG Reactive forms Reactive forms provide a model-driven approach to handling form inputs whose values change over time. This guide shows you how to create and update a basic form control, progress to using multiple controls in a group, validate form values, and create dynamic forms where you […]

Read More →

Angular Unit Testing of Spy Angular Unit Testing of Spy In this blog we are going to cover below all points. Unit testing of variables simply defined in component. Unit testing of DOM element after set a value using ngModel – To test element value of DOM we use fixture.detectChanges() method to callchange detection life […]

Read More →

Angular HTTP Request Testing HttpClient is introduced in Angular 6 and it will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. To start using the http service, we need to import the module in app.module.ts as shown below − HttpClientTestingModule  is used […]

Read More →

Dynamic Tooltip with Angular Pipe Most of the time we have a requirement to transform our data into a different style or format from what we received from API services. ✋ A pipe takes in data as input and transforms it into a desired output. Angular provides many Built-In Pipes as well as we can […]

Read More →

Best Practices for Writing Angular Apps If you are using ngOnInit() method, you should implement onInit interface as well. It is by-default but for best practice we should add it. Same as if you are using ngOnChanges() method, also implement onChanges interface as well. All public method should be first and private method should be […]

Read More →

Angular Interview Question & Answers What is difference between Angular JS and Angular? Angular JSAngular JS is open-source JavaScript frameworks, developed by Google in 2009 & version 1.0 was released in 2012.Angular JS is JavaScript based Framework. It use HTML as a template language. It extends HTML elements by adding tags. attributes and expressions.Architecture of Angular JS is based on Model-View-Controller (MVC) […]

Read More →