Posts

ANGULAR 20.3.18 - SEARCH AND PAGINATION - CUSTOM FILTER USING PIPE

Image
  ANGULAR 20.3.18 Employee Search with Pagination   🔷 1. Overview This feature allows users to: ✔ Search employees by Name, Designation, or Contact ✔ View results with Pagination ✔ Perform search without calling API again (client-side filtering) 🔷 2. Technologies Used Angular 20 (Standalone Components) Template Driven Forms ( ngModel ) Custom Pipe ( filterEmployees ) ngx-pagination 🔷 3. Service Layer (Data Fetching) 📌 What? Fetch employee data from API and store in service. 📌 Why? Centralized data storage Avoid multiple API calls 📌 Code getAllEmployees (): void { this . httpClient . get< any >( environment . apiUrl + 'Employees' ) . subscribe({ next: response => { this . employees = response . $values; } }); } 🔷 4. Component Layer (UI Control) 📌 What? Calls service Holds search input Displays data 📌 Code searchTerm : string = '' ; p : number = 1 ; itemsPerPage : number ...

JQUERY - INTERVIEW QUESTIONS AND ANSWERS

  Q1: What is jQuery and why is it used in  ASP.NET  Core? Answer:  jQuery is a fast, lightweight, and feature-rich JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. In  ASP.NET  Core, jQuery is commonly used for: Making AJAX calls to controllers DOM manipulation and validation Handling client-side events Enhancing UI interactions Example in  ASP.NET  Core: $ . ajax ( { type : "POST" , url : "/Employees/Create" , data : { name : "John" , salary : 50000 } , success : function ( response ) { $ ( "#result" ) . html ( "Employee added successfully" ) ; } } ) ; Q2: How do you include jQuery in an  ASP.NET  Core project? Answer:  There are multiple ways: Option 1: Using CDN (most common) < script src = " https://code.jquery.com/jquery-3.6.0.min.js " > </ script > Option 2: Using LibMan (Library Manager) // libman.json...