Posts

Showing posts with the label Angular

Top 50 Angular Interview Questions

Image
Angular Interview Questions, ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE        Angular Interview Questions 1.            What is architecture of Angular  ? 2.            What is singleton in Angular ? 3.            Major difference between BehaviourSubject and Subject? 4.            What is ngContent? 5.            What is ngTemplate ? 6.            What is ngContainer  ? 7.            What is Component Factory ? 8.            What is @ContentChildren and @ContentChild 9.            What is @Input and @Output 10. Best ways to interact among components 11. Difference between CSS and SCSS 12. Performance Improvement in Angular 13. Major Difference between Angular and AngularJS 14. What is service worker ? 15. What is AOT and IVY in Angular ? 16. What is Reactive forms in Angular? 17. What is Template Driven forms in Angular ? 18. What are the NPM dependencies? 19. How to implement localization in Angular ? 20. What are the advantage and drawback of Singl

How to get Array value in Angular ?

How to get Array value in Angular ? , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE How to get Array value in Angular? In this article we will learn , How to get array value in Angular . Step 1 : Create a new Angular Project using below command ng new angular-tour-of-heroes Step 2 : Create a new component using below command ng generate component how-to-get-array-value-in-angular Step 3 : Add Below code in how-to-get-array-value-in-angular.component.ts import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-how-to-get-array-angular', templateUrl: './how-to-get-array-angular.component.html', styleUrls: ['./how-to-get-array-angular.component.scss'] }) export class HOWTOGETArrayAngularComponent implements OnInit { fruits = ['Apple', 'Orange', 'Banana', 'blackberry', 'blackcurrant', 'blueberry', 'cherry' , 'coconut'

How to use @input in Angular

Image
How to use @input in Angular ? , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE   @Input  Decorator that marks a class field as an input property and supplies configuration metadata. The input property is bound to a DOM property in the template. During change detection, Angular automatically updates the data property with the DOM property's value. Let's take an example to understand it better 😊 We need to pass data from parent component to child component using @input  Step 1: Create a parent component by using the below code :  parent.component.html                    < h2 >This is parent component</ h2 >               < label   for = "cars" >Choose a Type:                             </ label >                           <!-- onChange($event) -->               <