Infosys
10+ Wipro Interview Questions and Answers
Q1. What is lazy loading and how can we achieve this?
Lazy loading is a technique used to defer loading of non-essential resources until they are actually needed.
Lazy loading helps improve the initial loading time of a web application by only loading essential resources upfront.
In Angular, lazy loading is achieved by creating separate modules for different parts of the application and loading them on demand.
Lazy loading can be implemented using the loadChildren property in the route configuration of Angular.
Lazy loading is commo...read more
Q2. Difference between in constructor and NgOninit()?
Constructor is used to initialize class properties, NgOnInit() is a lifecycle hook used to perform initialization after Angular has initialized the component.
Constructor is a TypeScript feature used to create and initialize class properties.
NgOnInit() is an Angular lifecycle hook that is called after Angular has initialized the component.
Constructor is called before NgOnInit() during component initialization.
Example: Constructor is used to inject services, NgOnInit() is used ...read more
Q3. What is a pipe in angular and its types
A pipe in Angular is used to transform data before displaying it in the template.
Pipes are used in templates to format data before displaying it to the user
There are built-in pipes like DatePipe, UpperCasePipe, LowerCasePipe, etc.
Custom pipes can also be created by implementing the PipeTransform interface
Pipes can be chained together to perform multiple transformations on the data
Q4. Write a logic in javascript to eliminate the duplicate elements in an array.
Use JavaScript to remove duplicate elements from an array of strings.
Create a new Set from the array to automatically remove duplicates
Convert the Set back to an array to get the final result
Q5. What is two-way binding?
Two-way binding is a feature in Angular that allows automatic synchronization of data between the model and the view.
Two-way binding allows changes in the model to be reflected in the view and vice versa
It simplifies the process of updating the UI based on user input or changes in the data model
Example: Using ngModel directive in Angular forms to bind input fields to model properties
Q6. Difference between Observable and Promise
Observable is a stream that allows multiple values over time, while Promise is a single value that resolves or rejects.
Observable can handle multiple values over time, while Promise can only handle a single value.
Observable is lazy, meaning it won't execute until it is subscribed to, while Promise is eager and executes immediately.
Observable is cancellable, allowing you to unsubscribe, while Promise is not cancellable once it is settled.
Observable provides operators for trans...read more
Q7. Array methods in javascript. Differences among those
Array methods in JavaScript and their differences
forEach() - executes a provided function once for each array element
map() - creates a new array with the results of calling a provided function on every element
filter() - creates a new array with all elements that pass the test implemented by the provided function
reduce() - applies a function against an accumulator and each element in the array to reduce it to a single value
find() - returns the first element in the array that s...read more
Q8. What is data binding ?
Data binding is the automatic synchronization of data between the model and view components in an application.
Data binding allows for the seamless updating of data in the model to be reflected in the view and vice versa.
There are two-way data binding and one-way data binding.
Two-way data binding updates the model and view simultaneously, while one-way data binding updates in one direction only.
Example: In Angular, using interpolation {{ }} or property binding [ ] for one-way ...read more
Q9. do you know lazy loading?
Lazy loading is a technique used to defer loading of non-essential resources until they are actually needed.
Lazy loading helps improve performance by only loading resources when they are required.
In Angular, lazy loading is commonly used for loading modules on demand rather than loading everything upfront.
Lazy loading can be implemented using Angular's RouterModule and loadChildren feature.
Q10. Sort array without using merhods
Sort array without using methods
Iterate through the array and compare each element with the rest to find the correct position
Swap elements if necessary to sort the array in ascending order
Repeat the process until the array is fully sorted
Q11. explain rxjs operators and usecase?
RxJS operators are functions used to manipulate and work with streams of data in reactive programming.
RxJS operators are used to transform, filter, combine, and handle errors in data streams.
Examples of RxJS operators include map, filter, mergeMap, switchMap, catchError, and debounceTime.
Operators are used in combination with Observables to create powerful data processing pipelines.
Understanding and mastering RxJS operators is essential for efficient data handling in Angular ...read more
Q12. How to apply ngclass
ngClass is used to conditionally apply CSS classes to an element in Angular.
Use ngClass directive in the template with an object or array of classes and conditions
Classes are applied when the condition is true, and removed when false
Example:
Q13. Angular Interceptors concept ?
Angular interceptors are a way to intercept HTTP requests and responses to perform operations like logging, modifying requests, or handling errors.
Interceptors can be used to modify outgoing requests or incoming responses.
They can be used for tasks like adding headers, logging requests, handling errors, or transforming data.
Interceptors are implemented as services that implement the HttpInterceptor interface.
Multiple interceptors can be chained together to perform different t...read more
Q14. Why we should use angular
Angular provides a robust framework for building dynamic web applications with features like two-way data binding, dependency injection, and modular architecture.
Angular offers a powerful toolset for creating single-page applications (SPAs) with a clean and organized code structure.
It provides built-in features like routing, forms handling, and HTTP client for seamless development.
Angular's two-way data binding simplifies the process of updating the UI based on changes in the...read more
Q15. What is Decorator?
Decorators are a design pattern in Angular that allows you to add behavior to classes, properties, or methods.
Decorators are functions that are prefixed with @ symbol and are used to modify classes or class members.
They are commonly used in Angular for metadata annotations, dependency injection, and more.
Examples include @Component, @Injectable, @Input, @Output, etc.
Q16. What is Directive?
Directives are markers on a DOM element that tell Angular to attach a specified behavior to that DOM element or transform the DOM element and its children.
Directives are used to extend HTML with new attributes or elements.
There are three types of directives in Angular: Component, Structural, and Attribute directives.
Examples of directives include ngIf, ngFor, ngStyle, and custom directives created by developers.
Q17. Reverse string without methods
Reverse a string without using built-in methods
Create an empty string to store the reversed string
Iterate through the input string from the last character to the first
Append each character to the empty string to reverse the input string
Q18. Entry point of angular
The entry point of Angular is typically the main.ts file.
Main.ts file is the first file that is executed when an Angular application is started.
It bootstraps the AppModule, which is the root module of the application.
Main.ts file also imports other necessary modules and components required for the application to run.
Q19. Explain lazy-loading?
Lazy-loading is a technique used to defer the loading of non-essential resources until they are actually needed.
Lazy-loading helps improve performance by only loading resources when they are required.
It is commonly used in web development to load images, scripts, or components on demand.
Lazy-loading can be implemented in Angular using the loadChildren method in the routing configuration.
Top HR Questions asked in Wipro
Interview Process at Wipro
Top Angular Frontend Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month