Mindtree – Angular Interview Questions
Here is the list of Angular Interview Questions which are recently asked in Mindtree company. These questions are included for both Freshers and Experienced professionals. Our Angular Training has Answered all the below Questions.
1. What are the Angular Modules?
Module in Angular refers to a place where you can group the components, directives, pipes, and services, which are related to the application. In case you are developing a website, the header, footer, left, center and the right section become part of a module.
2. What are the different types of filters in Angular?
- Uppercase
- Lowercase
- Currency
- Filter
- Orderby
3. What is Dependency Injection in Angular?
Dependency injection, or DI, is a design pattern in which a class requests dependencies from external sources rather than creating them. Angular's DI framework provides dependencies to a class upon instantiation. You can use Angular DI to increase flexibility and modularity in your applications.
4. Differentiate between one-way binding and two-way data binding.
In one-way data binding information flows in only one direction, and is when the information is displayed, but not updated. In two-way data binding information flows in both directions, and is used in situations where the information needs to be updated.
5. What do you understand by dirty checking in Angular?
Dirty checking is a simple process that boils down to a very basic concept: It checks whether a value has changed that hasn't yet been synchronized across the app. Our Angular app keeps track of the values of the current watches.
6. What is Transpiling in Angular?
Transpiling is the one o the process to convert the typescript into javascript. We can do this by using Traceur, a JS compiler. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
7. How to perform animation in Angular?
- Step 1: Enabling the animations modulelink. Import BrowserAnimationsModule , which introduces the animation capabilities into your Angular root application module.
- Step 2: Importing animation functions into component fileslink.
- Step 3: Adding the animation metadata propertylink.
8. Explain ViewEncapsulation?
Emulated view encapsulation (the default) emulates the behavior of shadow DOM by preprocessing (and renaming) the CSS code to effectively scope the CSS to the component's view. For details, see Inspecting generated CSS below. None means that Angular does no view encapsulation. Angular adds the CSS to the global styles.
9. New HTML element?
Angular elements are Angular components packaged as custom elements (also called Web Components), a web standard for defining new HTML elements in a framework-agnostic way.Angular provides the createCustomElement() function for converting an Angular component, together with its dependencies, to a custom element.
10. Import ________ module to use reactive form.
To work with Reactive forms, import the ReactiveFormsModule in root module or in a shared module. The ReactiveFormsModule contains all the form directives and constructs for working with angular reactive forms.
11. How to find missing number in array - program.
varnumArray = [0189459, 0189460, 0189461, 0189463, 0189466];
varmia = numArray.reduce(function(acc, cur, ind, arr) {
var diff = cur - arr[ind-1];
if (diff > 1) {
vari = 1;
while (i< diff) {
acc.push(arr[ind-1]+i);
i++;
}
}
returnacc;
}, []);
console.log(mia);
12. Explain the process about angular project bootstrap?
Bootstrap is a function component in the core ng module that is used for starting up the Angular application manually, which gives more control over how to initialize the application.
Free PDF : Get our updated Angular Course Content pdf
13. What is transclusion in Angular?
Transclusion is a very powerful and useful feature of AngularJS directives which allows a directive to use a template while still having the ability to clone the original content and add it to the DOM. Transclusion allows directives to generate dynamic, data-driven DOM structures that create a compelling user experience.
14. What are events in Angular?
In Angular, event binding is used to handle the events raised by the user actions like button click, mouse movement, keystrokes, etc. When the DOM event happens at an element (e.g. click, keydown, keyup), it calls the specified method in the particular component.
15. What is a decorator in Angular?
Decorators are functions that define the working of Angular features. It is used to isolate the decoration of a class without code modification. The main purpose of Angular decorators is to store metadata about a class, method, or property. The types of decorators are:
- Class.
- Property.
- Method.
- Parameter.
16. What do you mean by String Interpolation?
string interpolation is the process of evaluating a string literal that contains one or more placeholders. It yields a result in which the placeholders are replaced with their values.String interpolation in Angular is used to display dynamic data on an HTML template.
17. What is an AOT compilation in Angular?
The Angular ahead-of-time (AOT) compiler converts the Angular code into JavaScript code. The conversion happens before the browser downloads and runs the code. To achieve faster rendering in the browser, Compile your application during the build process.
18. What are modules in Angular?
A module is a mechanism or container to group the components, directives, pipes and services.It helps to encapsulate the code that deals with several aspects of an application. Developers can create modules using the NgModule decorator.
19. What will be the output at below program Function fun (input: boolean){ Let a = 100; If (input){ Let b = a +1; Return b; } Return b;}
Compilation error for b
Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors in the code, or, more unusually, due to errors in the compiler itself.
20. What is Buffer (window storage)?
A buffer is like a cache that is a data area of computer memory (RAM) reserved for temporary storage. For example, when you press several keys in quick succession on the keyboard, the commands are stored momentarily in a buffer, allowing the computer to process them in the correct order.
21. How did you hidden (not hide) the element in JQuery?
Use the jQuery :hidden Selector:
The jQuery :hidden selector can be used to test whether an element is hidden or not on a page.
22. How do we include css file ins. the component except using styleUrls property?
Angular components can be styled via global CSS the same as any other element in your application. Simply drop a `` element on the page. However, Angular additional gives developers more options for scoping the styles.
Book a Free Mock Interviews and Test your Angular Knowledge with our Experts
TOP MNC's ANGULAR INTERVIEW QUESTIONS & ANSWERS
Here we listed all Angular Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Angular .
To become a Angular Certified professional and join in your dream company, Enroll now for our Best Angular Training. We help you to crack any level of Angular Interviews and We offering Angular Training with 100% Placements.