(SOLVED) How to open a URL in a new Tab ?

In this tutorial , we will show you how you can open a URL in a new Tab and not a new window. we will start by creating a function to load a given URL into a new Tab . We can do this directly in the onclick JavaScript Action without a function . When […]

En Lire Plus

(SOLVED) how to insert an HTML element before another ?

If you need to insert an HTML element like one <div> or any other element before an existing element in the HTML Document you have to : 1. Get the element by ID : 2. Create the HTML element 3. Insert the element Here we will use insertBefore function to insert the created Div before the recovered Table. If you want […]

En Lire Plus

JavaScript : Qu’est-ce que le DOM ?

Le DOM ( Document Object Model ) c’est-à-dire “modèle d’objet de document”, en français , c’est une interface de programmation qui est une représentation du HTML d’une page web et qui permet d’accéder aux éléments de cette page web et de les modifier avec le langage JavaScript. Le DOM est comme un arbre où chaque élément peut avoir zéro ou plusieurs enfant. […]

En Lire Plus

Get The Differences Between Two Dates In JavaScript

JavaScript Differences Between Two Dates : Hi, welcome to the practice house. In this tutorial, we will learn about how to get the difference between two dates in JavaScript. Almost all the time, we use date input field to select the date. Sometimes we need to find the difference between two dates. If you are […]

En Lire Plus

Angular : HTML to PDF with htm2canvas and jsPDF

Angular HTML to PDF htm2canvas jsPDF : Sometimes we need to export our HTML page into a PDF file. So how can we do this? There are two helpful tools that we can use to do this. The first is jsPDF that help us to produce a PDF file from an HTML content. The following is the […]

En Lire Plus

TypeScript: map an objects collection into a different one

The map() method is helpful to creates a new array with the results of calling a provided function on every element in the calling array. Suppose that we have two classes: And we have an Angular service called ‘myService‘ that through a .getObjects() method returns the following data: If we need to fill a DestinationType array […]

En Lire Plus

(SOLVED) getTime() is not a function ?

getTime() is not a function : if you are using the function getTime() and you have this error (in javascript / Typescript ) that mean you are using the date as a String , so as a solution you must parse the Date. See the next example to understand how solve this !Solution :

En Lire Plus