Inaam Husain

Inaam Husain

I’m Inaam Husain a computer engineer and a blogger based out of Mumbai. I like to be updated on new upcoming emerging technologies. like Angular, React, Vue.js, EmberJs, NodeJS, etc. I like playing cricket, football in my free time.

replaceAll is not a function JavaScript Error

inaamhusain on May 20, 2021 🔥 0 views

I need an alternative of replaceAll method, as it was added in ES2021/ES12. const a = “[email protected]”; a = a.replace(“xxxx-“, “”); console.log(a); output // Actual [email protected] // Required [email protected]

discussion

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

inaamhusain on October 28, 2020 🔥 0 views

How can we avoid the event to be trigger on ngModelChange event while setValue() is called? My condition is like on the value change from dropdown selection I am showing confirmation popup. – on confirm, I want to set the new value which was changed, – on cancel, I want to reset the old value […]

discussion

How can we cache the HTTP requests in Angular 10?

inaamhusain on October 27, 2020 🔥 0 views

Is it possible to cache the HTTP requests in the Angular 10 version public getPart(id: any): Observable { return this.http.get(`${this.baseUrl}${id}`) .pipe(map((res: any) => res.data)); }

discussion

How to set the headers for every request in Angular?

inaamhusain on October 16, 2020 🔥 0 views

How can I set the header in every request in angular? Let’s say I have token in localStorage and that needs to set for every REST API call.

discussion

What is multicasting in angular and how to achieve multicasting?

inaamhusain on October 16, 2020 🔥 0 views

How to use multicast of Rxjs in angular? It will be great if you can explain with an example.

discussion

How can I select an element in a component template?

inaamhusain on October 16, 2020 🔥 0 views

Is there a way in angular where I can select an element and do the necessary operation to it?

discussion

Answer for Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory

inaamhusain on October 15, 2020 🔥 0 views

You can run the following command in terminal to increase the heap memory. export NODE_OPTIONS=”–max-old-space-size=8192″

discussion

How to use AsyncPipe in Angular?

inaamhusain on October 6, 2020 🔥 0 views

What is AsyncPipe in angular and how to use it? It will be great if someone can explain with an example.

discussion

How to use Wildcard route in Angular?

inaamhusain on October 5, 2020 🔥 0 views

How to define wildcard route in angular? I have to show page not found component if the URL doesn’t match anything.

discussion

Answer for routerLinkActive always set home page link as active even if other page is active – Angular 10

inaamhusain on October 4, 2020 🔥 0 views

I believe you need to use [routerLinkActiveOptions] in your template page. [routerLinkActiveOptions]=”{exact:true}” Set the above [routerLinkActiveOptions] directive to all navigation links, which will add the routerLinkActive class to only those navigation links which match the entire URL.

discussion
1 2 3