Rehmaanali

Rehmaanali

Founder Of Geekstrick. Full-Time Software Developer, Expertise in Frontend Development. Conversant with - Angular, React, NodeJS, and MongoDB, MySQL, Postgres,HTML+CSS+JS, CypressIO.

Answer for How to not trigger ngModelChange event on setValue in angular 10 reactive form

geekstrick on October 28, 2020 🔥 0 views

Instade of NgModelChange you can use the valueChange then you can handle whether to emit event or not on value change by passing emitEvent in setValue() if (save) { this.workOrderForm.get(‘productID’).setValue(newProduct.ID); // some more functionality } else { this.workOrderForm.get(‘productID’).setValue(oldProductID, {emitEvent: false}); } and in HTML <mat-select formControlName=’productID’ (valueChange)=’setNewProduct($event)’> … </mat-select>

discussion

Deno v1.5.0 New Version Released

geekstrick on October 27, 2020 🔥 2853 views

Deno v1.5.0 New Version Released has released today. This release will contain some new features, lots of bug fixes, and many feature stabilizations. Deno v1.5.0 up-gradation If the deno is already installed you can use the basic command to upgrade deno upgrade. incase if you are new, you can install it from the below options. […]

news

Answer for How can we cache the HTTP requests in Angular 10?

geekstrick on October 27, 2020 🔥 0 views

Yes it was possible then and now also in the latest version using rxjs/operators … private records$: Observables<any>; … public getPart(id: any): Observable<any> { if(!this.records$) { this.records$ = this.http .get(`${this.baseUrl}${id}`) .pipe(map((res: any) => res.data), shareReplay(1)); } return this.records$ // reply the last result for all new subscribers } Just pipe the stream through shareReplay operator. […]

discussion

Real-Time Notification With Socket.io, Angular 10 And NodeJS

geekstrick on October 26, 2020 🔥 175762 views

In this tutorial, we will see how can we achieve Real-Time Notification With Socket.io, Angular 10, and NodeJS. With WebSocket, we are allowed for full-duplex communication between a server and clients. WebSocket with socket.io The WebSocket goes beyond the typical HTTP request/response paradigm. With WebSockets, the server and client can send data without initiating a […]

post

Create React App v4.0.0 Has Released

geekstrick on October 24, 2020 🔥 5097 views

Create React App v4.0.0 release a major update with several new features, including support for Fast Refresh! The New Version Includes New Features and supports are list below: Create React App v4 Highlights Fast Refresh React 17 support includes the new JSX transform TypeScript 4 support New ESLint 7 Rules : New Jest and React […]

news

Best Way to Convert Angular 10 to Desktop App Using ElectronJS

geekstrick on October 23, 2020 🔥 158508 views

In this tutorial, we will see what is the Best Way to Convert Angular 10 to Desktop App Using ElectronJS. Other than the PWA (Progressive Web App) we can also convert the angular app to an actual desktop app using the ElectronJS library. Angular 10 to Desktop App Using ElectronJS Using Electron we can easily […]

post

New Updates In NodeJS v15.0.0 (Current)

geekstrick on October 20, 2020 🔥 2329 views

NodeJS v15 updated with a new major release of npm. npm 7 comes with many new features – Feature Including npm workspaces and a new package-lock.json format. npm 7 also includes yarn.lock file support. One of the big changes in npm 7 is that peer dependencies are now installed by default. NPM News: New Release […]

news

What Is A Currying Function In Javascript?

geekstrick on October 18, 2020 🔥 152942 views

In this tutorial, we will see What Is A Currying Function In Javascript. Currying is an alteration of functions that turns a function from callable as f(a, b, c) into callable as f(a)(b)(c). Currying Function In Javascript A currying function is a function that takes multiple arguments and turns it into a sequence of functions […]

post

Answer for How to set the headers for every request in Angular?

geekstrick on October 17, 2020 🔥 0 views

Add AuthInterceptor that will intercept all your HTTP requests and add the token to its headers: import { Injectable } from ‘@angular/core’; import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from ‘@angular/common/http’; import { Observable } from ‘rxjs’; @Injectable() export class AuthInterceptor implements HttpInterceptor { intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const token = localStorage.token; // […]

discussion

Answer for What is multicasting in angular and how to achieve multicasting?

geekstrick on October 17, 2020 🔥 0 views

Multi-casting is the practice of broadcasting to a list of multiple subscribers in a single execution. Let’s demonstrate the multi-casting feature, var source = Rx.Observable.from([1, 2, 3]); var subject = new Rx.Subject(); var multicasted = source.multicast(subject); // These are, under the hood, `subject.subscribe({…})`: multicasted.subscribe({ next: (v) => console.log(‘observerA: ‘ + v) }); multicasted.subscribe({ next: (v) […]

discussion