TCS
10+ Landmark Global Organisation Interview Questions and Answers
Q1. JavaScript 1. let vs var 2. shallow copy vs deep copy 3. timeout and more basics in JS Angular 1. Pipes 2. Dependency Injection 3. Routing
A set of questions related to JavaScript and Angular for an Angular Developer interview.
let vs var: let is block-scoped while var is function-scoped
shallow copy vs deep copy: Shallow copy creates a new reference to the original object, while deep copy creates a new object with its own copy of all nested objects
timeout: Used to delay the execution of a function or code block for a specified amount of time
Pipes: Used for transforming data in Angular templates
Dependency Injectio...read more
Q2. Difference between Normal Function and Arrow Function?
Normal functions are defined using the function keyword, while arrow functions are defined using the => syntax.
Normal functions are hoisted, while arrow functions are not.
Arrow functions do not have their own 'this' keyword, they inherit it from the parent scope.
Arrow functions are more concise and have implicit return.
Arrow functions cannot be used as constructors.
Arrow functions are not suitable for methods within objects due to the lack of their own 'this'.
Q3. what is a strict operator and rest operator
Strict operator (!) is used to check if a value is truthy or falsy. Rest operator (...) is used to collect multiple arguments into an array.
Strict operator (!) checks if a value is truthy or falsy, for example: if (!value) { // do something }
Rest operator (...) collects multiple arguments into an array, for example: function sum(...args) { return args.reduce((acc, val) => acc + val, 0); }
Q4. What are the ES6 features?
ES6 features are modern JavaScript syntax enhancements introduced in ECMAScript 2015.
Arrow functions for concise syntax: const add = (a, b) => a + b;
Let and const for block-scoped variables: let x = 5; const y = 10;
Template literals for string interpolation: const name = 'Alice'; console.log(`Hello, ${name}!`);
Classes for object-oriented programming: class Person { constructor(name) { this.name = name; } }
Destructuring for easy assignment: const { a, b } = { a: 1, b: 2 };
Spre...read more
Q5. What is the use of Service in Angular?
Services are used to share data or functionality across components in Angular.
Services are singleton objects that can be injected into components.
They can be used to share data between components.
They can also be used to encapsulate and share functionality.
Examples include HTTP service for making API calls and logging service for tracking user actions.
Q6. What is component, how to share data between component, what is pipe
Components are building blocks of Angular applications. Data can be shared between components using input/output properties, services, or state management. Pipes are used for data transformation in templates.
Components are reusable, self-contained units of code that define the view and behavior of a part of the application.
Data can be shared between components using @Input and @Output properties for parent-child communication, services for cross-component communication, or st...read more
Q7. List of lifecycle hooks?
Angular lifecycle hooks are methods that allow you to tap into specific points in a component's lifecycle.
ngOnChanges
ngOnInit
ngDoCheck
ngAfterContentInit
ngAfterContentChecked
ngAfterViewInit
ngAfterViewChecked
ngOnDestroy
Q8. Angular bootstrapping process?
Angular bootstrapping process initializes the Angular application by loading the root module and compiling the component templates.
Angular application is bootstrapped by calling the 'platformBrowserDynamic().bootstrapModule()' method in the main.ts file.
The 'AppModule' is typically the root module of the Angular application.
During bootstrapping, Angular creates the component tree, compiles the component templates, and starts the application.
Q9. what are types of data binding?
Types of data binding in Angular include one-way binding, two-way binding, and event binding.
One-way binding: Data flows in one direction from the component class to the template. Example: {{ data }}
Two-way binding: Data flows in both directions between the component class and the template. Example: [(ngModel)]
Event binding: Allows you to listen for and respond to user events in the template. Example: (click)
Q10. Java script array methods
JavaScript array methods are built-in functions that manipulate arrays.
Some common array methods are push(), pop(), shift(), unshift(), slice(), splice(), concat(), join(), and sort().
push() adds an element to the end of an array.
pop() removes the last element from an array.
shift() removes the first element from an array.
unshift() adds an element to the beginning of an array.
slice() returns a new array with a portion of the original array.
splice() adds or removes elements fro...read more
Q11. What is NgViewInit()
NgViewInit() is a lifecycle hook method in Angular that is called after the component's view has been fully initialized.
NgViewInit() is used to perform tasks that require the view to be fully initialized, such as initializing data-bound properties or setting up event listeners.
It is commonly used to fetch data from a backend API and update the view accordingly.
Example: ngOnInit() { this.http.get('api/data').subscribe(data => { this.data = data; }); }
Q12. What is angular
Angular is a popular open-source web application framework developed by Google for building dynamic single-page applications.
Angular is based on TypeScript, a superset of JavaScript.
It uses a component-based architecture for building UI elements.
Angular provides features like data binding, dependency injection, and routing.
It has a powerful CLI for scaffolding and managing projects.
Angular is commonly used for building interactive web applications.
Q13. advantage of using bootstrap
Bootstrap provides a responsive grid system, pre-designed components, and customizable themes for faster and easier web development.
Responsive grid system allows for easy layout adjustments for different screen sizes
Pre-designed components like buttons, forms, and navigation bars save time and effort in coding
Customizable themes help in creating a consistent and visually appealing design
Bootstrap also offers JavaScript plugins for interactive elements like carousels and modal...read more
More about working at TCS
Interview Process at Landmark Global Organisation
Top Angular Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month