Angular route using route params

We can use route feature of angular to move from one component to another. The template way of using the route feature is as below. <button class="btn btn-success" [routerLink]="['/dashboard', data1, data2, data3]">Continue</button> We can route...
Read More ⟶

CaesarCipher string manipulation

function CaesarCipher(str,num) { if(num < 0) { return CaesarCipher(str, num + 26); } let output = ""; for(let i=0; i<str.length; i++) { let c = str[i]; if(c.match(/[a-z]/i)) { let code = str.charCodeAt(i); if(code >=...
Read More ⟶

NodeJs mongodb query to fetch collection data with total length offset and limit

This is how we query from mongodb collection to fetch data with total length, offset and limit. For total length we need to use async. let url =...
Read More ⟶

How to modify the response to an HTTP request and access it before return it out from Observable?

We often need to modify the response that is return from the http request before it return as observable. That means before we parse it into our component we might need to update. It all depends on the version of RxJs. Angular 6 launches with RxJs 6 - which means...
Read More ⟶

Update Angular locally

Update angular locally . This small article I am going to show you how you can easily update your local angular version to latest. I am using npm-check-updates package to update the package.json Follow the below steps. # Install npm-check-updates $ npm i -g...
Read More ⟶

SASS mixins for placeholder text input

@mixin placeholder { ::-webkit-input-placeholder {@content} :-moz-placeholder {@content} ::-moz-placeholder {@content} :-ms-input-placeholder {@content} } @include placeholder { font-style:italic; color: white; ...
Read More ⟶

Sorting Algorithms

Sorting an array with an higher order function now a days is very easy. let x = [2,5,8,1,3] x.sort() //[1,2,3,5,8] Now doing same thing with vanilla JavaScript algorithms. let a = [5,2,1,3,7,100]; let Alen = a.length; let ans = []; for(let...
Read More ⟶

Reverse an Array using JavaScript

This article I am going to show you the different way you can reverse an Array. Array is a group of similar item, number etc that is store in single variable. For eg: let arr1 = [1,2,3]; This is an array example with a group of numbers. There are multiple...
Read More ⟶

Create Pyramid structure from javascript

Create Pyramid structure from JavaScript simple nested loop var rows = 10 for(var i=0; i<=rows; i++){ for(var k=1; k<=rows-i; k++){ document.write(" ") } for(var j=0; j<=i; j++) { document.write("*...
Read More ⟶

jQuery 0 Comment

Jquery onmouseover and onmouseout event with animate

We can make an event with jquery when we take our mouse over any element. We need to get an class, id or any unique identification of element to perform better result. In the same time when we move our mouse from certain div we can bind that event too with some sort of...
Read More ⟶