Angular Date pipe in component ts file

This article will show you how to use Angular Date pipe in component ts file. To achieve the same we need to import `DatePipe` exported function from angular core modules. import { DatePipe } from '@angular/common'; transform() { return new...
Read More ⟶

Property ‘createId’ does not exist on type

This error generally comes when you upgrade your angular fire and firebase to the latest version. data['id']=this.createId(); For the new Firebase 9 you need to do the following change. ...
Read More ⟶

Revert Last commit in GIT

Revert last commit in GIT git reset --soft HEAD~1 --soft will not remove your uncommited code. Again if you replace the same with --hard it is going to replace all the uncommited code in your local git reset --hard...
Read More ⟶

Track all remote branches GIT

Here we will show you how to track all remote branches in GIT and get them all at once in your local. Below is the demo of a git where there are several branches and each branches there are some code. https://github.com/Santoshah/firebase-auth To get...
Read More ⟶

Modes of SVG

Three modes of SVG Object embeded srcobject data=""iframe src="" Image img srcbackground : url() Inline svg path {stroke-dasharray: 5, 2;stroke-dashoffset :...
Read More ⟶

Function Performance check

const myAwesomeArray = [1, 2, 3, 4, 5] const startForEach = performance.now() myAwesomeArray.forEach(x => (x + x) * 10000000000) const endForEach = performance.now() console.log(`Speed [forEach]: ${endForEach - startForEach} miliseconds`) const startMap =...
Read More ⟶

Check word score in a string

// Capital letter - 1 // small letter - 2 // number - 3 // spl char - 4 let str = "l. lorem ip 123"; let str1 = "skdfh skdfh alsjdhf KJHGH24 ksdhfksfh"; let arrayStr = str1.split(" "); let obj = {} function checkCase(ch) { if (!isNaN(ch *...
Read More ⟶

JIT and AoT in Angular

In this another small article I am going to explain what is different between JIT and AoT in Angular and which one is better. Just In Time (JIT) and Ahead of Time (AoT) is Angular compiler which runs in Angular background Just in Time (JIT) Inefficent for...
Read More ⟶

JavaScript Algorithm to find all possible anagram of a string

JavaScript Algorithm to find all possible anagram of a string. let genAnagrams = (word, n, anagram = '', anagrams = []) => { word = word.toUpperCase(); if(anagram) { anagrams.push(anagram) } if(!word) { return } ...
Read More ⟶

A gentle introduction into tree shaking in Angular Ivy

First, let’s understand a few key terms and I will also include references to articles if you need a deeper understanding of these concepts: Ivy — It is the code name for Angular’s next-generation compilation and rendering pipeline. Read here and for...
Read More ⟶