L&T – Angular Interview Questions
Here is the list of Angular Interview Questions which are recently asked in L&T company. These questions are included for both Freshers and Experienced professionals. Our Angular Training has Answered all the below Questions.
1. Array questions (all sorts of array functions like get unique element in array)
Distinct elements of an array are immutable values in all types except objects. Types of primitive values include Boolean, Null, Undefined, Number, String and Symbol.In ES5 and ES, we can get unique values in JavaScript arrays of primitive values.
2. Explain about let and const in ES6
In ES6 “const” will have block scoping just like the “let” keyword. A constant is a block scope that cannot be shared its name with a function or a variable in the same scope. The value of a constant cannot change through re-assignment, and it can't be redeclared. The const declaration creates a read-only reference to a value.
3. What is super keyword and its usage
The super keyword is used to access and call functions on an object's parent.prop and super[expr] expressions are valid in any method definition in both classes and object literals.
4. What is interceptor in angular
Interceptors are a unique type of Angular Service and allow us to intercept incoming or outgoing HTTP requests using the HttpClient. By intercepting the HTTP request, we can modify or change the value of the request.
5. Services in angular?
Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application.
6. Property binding in angular
Property binding in Angular helps you set values for properties of HTML elements or directives. Use property binding to do things such as toggle button functionality, set paths programmatically, and share values between components.
7. Event binding 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.
8. Meta data in angular
Metadata is used to decorate a class so that it can configure the expected behavior of the class. Annotations are decorators at the class level. This is an array and an example having both the @Component and @Routes decorator.
9. Closures in javascript
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment) that is, it gives access to an outer function's scope from an inner function.
10. Http status codes
Status codes are issued by a server in response to a client's request made to the server. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role.Example:
- Informational responses ( 100 – 199 )
- Successful responses ( 200 – 299 )
11. Difference btwn put and post in http
PUT method is call when we modify a single resource, which is already a part of resource collection. POST method is call when add a child resource under resources collection. RFC-2616 depicts that the PUT method sends a request for an enclosed entity stored in the supplied request URI.
12. Html5 web apis
HTML APIs are a collection of JS libraries which can be used directly in HTML files without incorporating any customize JavaScript code. HTML5 specifies scripting application programming interfaces (APIs) that can be used along with JavaScript.
13. What is Object?
HTML APIs are a collection of JS libraries which can be used directly in HTML files without incorporating any customize JavaScript code. HTML5 specifies scripting application programming interfaces (APIs) that can be used along with JavaScript.
14. Explain ViewEncapsulation?
Emulated view encapsulation emulates the behavior of shadow DOM by preprocessing the CSS code to effectively scope the CSS to the component's view. None means that Angular does no view encapsulation. Angular adds the CSS to the global styles.
15. Write syntax for component, directives and pipe decorator
To Create a component using the Angular CLIlink
From a terminal window, navigate to the directory containing your application. Run the ng generate component
Mapfile directives exist to specify many aspects of the output object. These directives share a common syntax, using name value pairs for attributes, and {...} directive. The next form is a directive name with a value, or a white space separated list of values.
To Create Custom Pipes in Angular
Create a Pipe Class and decorate it with the decorator @Pipe. So supply a name property to be used as template code name. Register the Pipe in the module under declarations.Finally, implement PipeTransform and write transformation logic.
16. What is event distner and Host distner in Angular?
HostListener - Declares a host listener. It will invoke the decorated method when the host element emits the specified event. @HostListener - will listen to the event emitted by the host element that's declared with @Host Listener. HostBinding - Declares a host property binding.
17. What is primitive data type?
Simple types are also called the primitive types which belongs to built-in predefined types found in TypeScript. The primitive data type is number, string, boolean, null type, and undefined types.
Free PDF : Get our updated Angular Course Content pdf
18. Css transform function. what is the use of skew
The skew() function is an inbuilt function which is used to transform an element in the 2D plane. Skew an element means to pick a point and push or pull it in different directions.
19. Have u worked on end to end testing frameworks
End-to-end testing is a Software testing methodology to test an application flow from start to end. The purpose of End to end testing is to simulate the real user scenario and validate the system under test and its components for integration and data integrity.
20. Difference btwn let const and var.
var declarations are globally scoped or function scoped that can be updated while let and const are block scoped. var variables can be updated and re-declared within its scope; const variables can neither be updated nor re-declared. They are all hoisted to the top of their scope.
21. How will u make a popup responsive using bootstrap class . Note popup is center aligned in a page
You'll need to add media query to make it responsive. When screen-width goes below 600px, this css will make the width of popup 100% instead of fixed 550px. So this will make the div fit to the screen.
22. array.push method example
Directives are classes that add additional behavior to elements in the Angular applications. With Angular's built-in directives, we can manage forms, lists, styles, and what users see.
23. What is a angular directive
Directives are classes that add additional behavior to elements in the Angular applications. With Angular's built-in directives, we can manage forms, lists, styles, and what users see.
24. What is an Observables in angular ?
Angular makes use of observables as an interface to handle a variety of common asynchronous operations. To define custom events, send observable output data from a child to a parent component. The HTTP module uses observables to handle AJAX requests and responses.
25. What is a callback function
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
26. Difference between promise and observables
Promises deal with one asynchronous event at a time, while observables handle a sequence of asynchronous events over a period of time.
27. What is the use of arrow functions. What is the difference between normal function and arrow functions
Unlike regular functions, arrow functions do not have their own this. Arguments objects are not available in arrow functions, but are available in regular functions. Regular functions created using function declarations or expressions are 'constructible' and 'callable'.
28. Where can you apply closure in real time project
To use a closure, define a function inside another function and expose it. To expose a function, return it or pass it to another function. The inner function will have access to the variables in the outer function scope, even after the outer function has returned.
29. Use of Array Distinct() ?
The simplest way to get unique elements from the array is by putting all elements of the array into hashmap's key and then print the keySet(). The hashmap contains only unique keys, so it will automatically remove that duplicate element from the hashmapkeySet.
30. Difference between position fixed and static
A STATIC positioned element is what we get by DEFAULT (Normal positioning of objects) the position and dimensions of an element with position:fixed are always relative to the initial containing block.
31. Explain Call and apply method?
The apply() method is an important method of the function prototype and is used to call other functions with a provided this keyword value and arguments provided in the form of array or an array like object.The call() method is used to call a function with a given this and arguments provided to it individually.
32. What is display:block and display:none?
display: none means that the element is not displayed at all. display: block means that the element is displayed as a block, as paragraphs and headers have always been.
33. ________ keyword is used to access class's member variables and functions inside class member function
in the class when we refer to one of the members of the class we prepend this keyword. This denotes that it’s a member access.
34. doAdd(1,2) doAdd( 1.2,3,4) use the above arguments to sum the values. using without any parameter receive through the function
A programming language is said to have First-class functions when functions in that language are treated like any other variable. For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable.Nowwe just need to create a function which returns another function, which in turn would give the sum.
35. How did you hidden (not hide) the element in JQuery?
Use the jQuery: hidden Selector
It can be used to test whether an element is hidden or not on a page.
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.
Related Tags
- Angular Developer Course in Velachery
- Angular Developer Training in Adyar
- Angular Developer Course in Chennai
- Angular Developer Course with Placement in Chennai
- Best Angular Developer Course in OMR
- Angular Developer Course in Online
- Angular course with Placement
- Angular course with Placement
- Angular Course in Chennai
- Angular developer Course Free