1 What are filters in Angular? Name a few of them.
Filters are used to format an expression and present it to the user. They can be used in view templates, controllers, or services. Some inbuilt filters are as follows.Â
What is view encapsulation in Angular?
View encapsulation defines whether the template and styles defined within the component can affect the whole application or vice versa. Angular provides three encapsulation strategies:
AngularJS controllers control the data of AngularJS applications. They are regular JavaScript Objects. The ng-controller directive defines the application controller.
3 How to use ngFor in a tag?Â
The ngFor directive is used to build lists and tables in the HTML templates. In simple terms, this directive is used to iterate over an array or an object and create a template for each element.Â
     Â
What is ngOnInit? How is it defined?Â
ngOnInit is a lifecycle hook and a callback method that is run by Angular to indicate that a component has been created. It takes no parameters and returns a void type.
export class MyComponent implements OnInit {
  ngOnInit(): void {
Introduction On Unit Testing Interview Questions
Unit testing is considered as a vital phase in software testing. It is not easy to write unit test cases for everyone, but it demands more practice, knowledge, and techniques. To know everything about Unit testing and tips for writing robust test cases, you should join the Unit Testing Certification program at JanBask Training. Once you are done with the training, go through this Unit Testing Interview Questions blog and evaluate your current skills level. Let us start with basic questions first then we will discuss questions for the advanced workforce too.
Understand DevOps Tools and SLDC. Become an expert in Advanced Projects and Case Studies. Enroll in DevOps Certification Training now!
2 What are Services in Angular?Â
Angular Services perform tasks that are used by multiple components. These tasks could be data and fetching, network connections, and database management among others. They perform all the operational tasks for the components and avoid rewriting of code. A service can be written once and injected into all the components that use that service.Â
2 Explain the lifecycle hooks in Angular
In Angular, every component has a lifecycle. Angular creates and renders these components and also destroys them before removing them from the DOM. This is achieved with the help of lifecycle hooks. Heres the list of them -Â