How to download a file in JavaScript

In this article, we'll see how to download files in JavaScript.

02 Oct 2022

Read article

Import & reexport Material components from shared

In this article, we will see how to import and re-export Material components from a shared module

26 Sep 2022

Read article

Angular href preventDefault

The href tag is used to direct the user to different web pages. href allows users to navigate to another website from the current one. It is most commonly found in anchor tags.

26 Sep 2022

Read article

Seeding test data in TypeORM

We've created database entities so far that TypeORM can use to build SQL tables. Let's start by adding some data to the database. This could be done manually, but it would be tiresome; we need to adequately automate it so that we can have it up and running right away.

25 Sep 2022

Read article

Setup TypeORM

In the preceding guides, we covered the basics of implementing a backend application using Node.js and GraphQL. In addition, we detailed the steps necessary to set up Express.js with TypeScript and GraphQL. Mocking allowed us to get Apollo Server up and running as a GraphQL server before implementing the resolvers that are meant to perform the actual work of retrieving and inserting data.

25 Sep 2022

Read article

TypeORM Entity & Column decorators

We'll develop entities in this tutorial to represent our community database. We'll see how to use the Entity and Column decorators of TypeORM to decorate classes that map to SQL tables.

25 Sep 2022

Read article

Setup TypeORM

In the preceding guides, we covered the basics of implementing a backend application using Node.js and GraphQL. In addition, we detailed the steps necessary to set up Express.js with TypeScript and GraphQL. Mocking allowed us to get Apollo Server up and running as a GraphQL server before implementing the resolvers that are meant to perform the actual work of retrieving and inserting data.

25 Sep 2022

Read article

Create PostgreSQL database & user

In the preceding guides, we covered the basics of implementing a backend application using Node.js and GraphQL. In addition, we detailed the steps necessary to set up Express.js with TypeScript and GraphQL. Mocking allowed us to get Apollo Server up and running as a GraphQL server before implementing the resolvers that are meant to perform the actual work of retrieving and inserting data.

25 Sep 2022

Read article

Angular 14 Apollo Client Setup

In a previous tutorial, we've developed the GraphQL API on top of Apollo server, we'll see now how it can be integrated with an Angular frontend.

24 Sep 2022

Read article

Angular 14 Apollo Client Setup

In a previous tutorial, we've developed the GraphQL API on top of Apollo server, we'll see now how it can be integrated with an Angular frontend.

24 Sep 2022

Read article

Debugging Angular applications

By default, Angular operates in development mode, which has debugging enabled. To switch to production mode, which also stops debugging and excludes any debugging information from the final production bundles...

24 Sep 2022

Read article

Configuring CORS with Express.js

The term cross-origin resource sharing or CORS is used to describe a process by which we can permit or forbid requests from other domains for otherwise protected resources on a web page that are being provided from a given domain.

21 Sep 2022

Read article

Use JavaScript's Object.entries() for iterating over an object's properties

In this article, we'll see how to use JavaScript's Object.entries() method for iterating over an object's properties.

20 Sep 2022

Read article

How to get current time zone in JavaScript

In this article we will learn how to get current time zone in JavaScript

20 Sep 2022

Read article

How to add days to dates in JavaScript

In this article we will learn how to add days to dates in JavaScript.

20 Sep 2022

Read article

Transform data with Angular pipes

In this tutorial, we'll see how to use a pipe in Angular 14 to transform and display data in our components' templates.

19 Sep 2022

Read article

Angular 14 Routing and RxJS switchMap

In this tutorial, we'll continue building our app with Angular 14 and Contentful. We'll look at how to access route parameters using `ParamMap` and since our previous service method returns an observable, we'll see how to flatten the observable with the `switchMap` operator and subscribe to the resulting observable to get the fetched entry from the headless CMS and assign it to the jobListing property that we'll define in our Angular component below.

19 Sep 2022

Read article

Angular 14 Service for communicating with Contentful CMS

In this tutorial, let's now create the service that will encapsulate the code for communicating with Contentful.

19 Sep 2022

Read article

Setup Angular 14 environment variables

In this tutorial, we'll look at how to set up environment variables in Angular 14 and bootstrap for UI styling.

19 Sep 2022

Read article

Build Angular 14 apps with Contentful headless CMS

In this tutorial, you'll learn how to build a full-stack app using Contentful and Angular 14.

19 Sep 2022

Read article

Mocking GraphQL with Apollo Server

Thanks to mocking, UI development can begin before the backend is fully functional. The UI can be tested without having to wait for lengthy database operations or maintaining a full-fledged GraphQL server.

17 Sep 2022

Read article

GraphQL APIs with Apollo Server & Apollo Studio [Part 2]

With our Apollo Server now up and running, we can shift our focus to creating the GraphQL schema for the community app. Users, friends, posts, comments, likes, and notifications are what we'll be focusing on.

17 Sep 2022

Read article

GraphQL APIs with Apollo Server & Apollo Studio

As an open source GraphQL server, Apollo Server is community-maintained and will be the basis for our GraphQL API development in this article.

16 Sep 2022

Read article

Watch and compile TypeScript code to JavaScript

Now, with ts-node, we don't need to compile TypeScript before running it. While this is ideal for development, it will require us to restart the script every time we make a change.

15 Sep 2022

Read article

Setup TypeScript with Node.js & Express.js

In this article, we'll proceed to the next step , which is setting up the necessary requisites, typescript and ts-node with Node.js and Express.js, for development

15 Sep 2022

Read article

Setup the server with Node.js/Express.js/Apollo

In the previous articles, we installed Node.js and PostgreSQL on our development machine. In this article, we'll begin by developing the API that the frontend app will consume.

14 Sep 2022

Read article

Storing data with PostgreSQL and TypeORM

A PostgreSQL database will be used to store the information. While a local PostgreSQL server will be used during development, a cloud-hosted relational database such as Amazon Relational Database Service (Amazon RDS) or another service of your choosing can be used during production.

14 Sep 2022

Read article

Using GraphQL and Apollo for front- and back-end integration

We know what Node is and that our backend server will be run by Express.js, we need to know what GraphQL is and how it fits into this stack.

14 Sep 2022

Read article

Using NVM on Windows

How to use NVM on Windows

14 Sep 2022

Read article

How to Use Node.js to Run JavaScript on Servers

Node.js is an open source software platform and runtime environment that makes use of an event-driven, non-blocking input/output (I/O) architecture to enable users to run JavaScript on your server. In 2009, Ryan Dahl developed Node.js on based on Google Chrome's JavaScript Engine (V8 Engine).

14 Sep 2022

Read article

Modern full-stack single-page apps' architecture

Node.js is an open source software platform and runtime environment that makes use of an event-driven, non-blocking input/output (I/O) architecture to enable users to run JavaScript on your server. In 2009, Ryan Dahl developed Node.js on based on Google Chrome's JavaScript Engine (V8 Engine).

13 Sep 2022

Read article

Angular 14 tutorial: beginner's series

In this tutorial series we'll cover, the new Angular 6 features, the basics and the in-depth concepts of Angular 4/5/6 framework, starting with how to install the Angular CLI 6 and how to upgrade an existing Angular 5 project to Angular 6.

01 Jul 2022

Read article

Reset file input with React

In this quick example, we will see how to reset the file input in React using a ref.

28 Jun 2022

Read article

Get an element by ID in React

In this quick example, we will see how to get an element by ID in React using useRef and useEffect.

28 Jun 2022

Read article

Release Angular 14 libraries with lerna & commitizen

In this tutorial, we’ll learn how to streamline Angular 14 library releases with commit conventions.

06 Jun 2022

Read article

3+ Ways to Add Authentication to Ionic 6

In this article we'll look at the available options for adding authentication to your Ionic 6 application

06 May 2022

Read article

React 18 hooks tutorial with examples

React hooks are a new feature that is recently released by the React team. In this tutorial, you will learn the basics of hooks and how to migrate a React app to use functional components and hooks instead of classes

05 May 2022

Read article

Remove an element from a useState Array in React 18

When we are working with React and array state, we may need to remove an item from a React component's state array. JavaScript's React UI library is solely responsible for rendering the user interface. No helper libraries for arrays are provided, but JavaScript already has a number of methods to work with arrays and other data types.

25 Apr 2022

Read article

Update Arrays with React useState Hook Without Push

In this article, we'll see by example how to update arrays via the React hook useState() using the push() method of the Array object

24 Apr 2022

Read article

React state array: get length example

In this short article, we'll look at how to get the length of an array or state array in React. Because React is a JavaScript library for rendering user interfaces, it focuses solely on rendering the UI and does not provide additional utilities for working with arrays or other similar tasks. As a consequence, you must rely primarily on JavaScript's built-in methods and APIs.

24 Apr 2022

Read article

Running Node.js in web browsers

Node.js remains a key expertise for front-end developers due to the vast ecosystem of Node-based tools and applications that are required for modern front-end web development.

22 Apr 2022

Read article

Git and GitHub for JavaScript/Angular Developers with VS Code

Throughout this tutorial, We’ll learn together from the basic steps what Git is, how to use it for your web development projects with JavaScript and Angular, and how to use it along with GitHub to collaborate with other developers that are part of your team or if you just want to contribute to other open-source projects

09 Oct 2020

Read article

Angular 10 Leave Browser Beforeunload Event: Warn Users Leaving your App

In this article, we'll learn about the beforeunload event which is a browser event that's used to prompt or warn users that they're about to leave a page or in our case the Angular app

24 Sep 2020

Read article

3+ Ways for Adding Bootstrap to Vue 3 Apps

In this article, we'll see the available options for adding Bootstrap to your Vue 3 apps

19 Sep 2020

Read article

Bootstrap 4 Custom File Input Button Text

In this quick tip article, we'll see how to add comments to the package.json file

15 Sep 2020

Read article

How to add comments to package.json

In this quick tip article, we'll see how to add comments to the package.json file

15 Sep 2020

Read article

Bootstrap 5 with Sass and Gulp 4 Tutorial by Example

In this tutorial, we'll learn how to use Bootstrap 5 to build a simple blog page with Gulp 4 and Sass. We'll use JavaScript to fetch data from a JSON endpoint that exports the latest posts from Techiediaries

08 Sep 2020

Read article

Bootstrap 5 Close Button by Example

Bootstrap 5 comes with a new component that can be used to add a close button for dismissing other dismissable components such as popovers, modals and alerts

08 Sep 2020

Read article

Using Comments in JSON with Node.js and JavaScript Examples

In this quick example, we'll learn how to add single-line and multiple-line comments to JSON

05 Sep 2020

Read article

Read JSON Files In NodeJS With require() and fs.readFileSync()

How to read JSON files with NodeJS require() and fs.readFileSync()

01 Sep 2020

Read article

Promise.all() and map() with Async/Await by Example

In this quick example, we'll learn how to use Promise.all() with Async/Await in JavaScript

31 Aug 2020

Read article

Picture-in-Picture with JavaScript and Angular 10

In this quick example, we'll learn how to use Picture-in-Picture with JavaScript and Angular 10

31 Aug 2020

Read article

Frontity Tutorial: The React framework for WordPress

In this tutorial, we'll learn about Frontity, The React framework for WordPress

31 Aug 2020

Read article

Convert Promise-Based Chain to Async/Await with VS Code

In this quick example, we'll learn how to convert a promise in JavaScript to async/await syntax manually and then with VS Code

31 Aug 2020

Read article

Jasmine Unit Testing for Angular 12

In this tutorial, we'll present you with a quick and complete guide to testing with Jasmine in Angular 12

27 Aug 2020

Read article

Angular 10/9 Elements Tutorial by Example: Building Web Components

In this Angular 10 Elements tutorial by example we'll learn how to use Angular to build web components or custom elements.

04 Aug 2020

Read article

Convert String To Number/Array In JavaScript with React Hooks/Vue.JS Examples

In this tutorial, we'll learn by example how to convert a string to the corresponding integer or float number or array of numbers using the built-in JavaScript methods with simple React and Vue.js examples

09 May 2020

Read article

React Hooks & GraphQL Apollo Tutorial: Build a First Example App in 4 Easy Steps

In this tutorial, we'll learn how to build a React application in four easy steps with React Hooks and GraphQL Apollo for consuming a third-party API

05 May 2020

Read article

JavaScript Reactive/Asynchronous Code with RxJS 6, TypeScript & Angular 10: Callbacks, Promises and Observables

In this tutorial, we'll learn to use the RxJS 6 library with Angular 10.9. We'll learn about how to import the Observable class and the other operators. How to subscribe and unsubscribe from Observables, how to import and call operators and wrap them with the `pipe()` function. We'll also see how to use the async pipe to subscribe to Observables from templates

04 May 2020

Read article

React, Axios and Redux: Asynchronously Fetch and Save Data to Local Storage

In this tutorial, we'll learn about many of Redux concepts by creating a simple React application from scratch using React, Redux and Axios to asynchronously fetch and save data to Local Storage.

25 Apr 2020

Read article

JavaScript/Node Top-lavel Await Example

Before the new top-level await, you can only await for a piece of code inside a (arrow) function that's defined with the async keyword

30 Mar 2020

Read article

Angular 9 Web Components: Custom Elements & Shadow DOM

Throughout this tutorial, we’ll teach you to create a native web component using the latest Angular 9 version. Part of standard web components are custom elements and shadow DOM which provide a way to extend HTML by creating your custom HTML tags and encapsulating the DOM tree and CSS styles behind other elements

18 Feb 2020

Read article

JavaScript Fetch Tutorial: Send HTTP Requests With React.JS and Async-Await Example

In this tutorial and example, we'll see how to use Fetch to send GET requests inside a Reacts.js example application. We'll also see how to use the Async/Await syntax to avoid using JavaScript Promises in your code

09 Dec 2019

Read article

JavaScript Promises Tutorial with Angular 7/8 Example

In this tutorial designed for Angular developers, you'll learn about JavaScript Promises introduced in ES6 and you'll see how you can use them with an Angular 7/8 example.

05 Sep 2019

Read article

JavaScript Async/Await with Angular 7/8 Observable and HTTP Example

In this tutorial, we'll learn about JavaScript/ES7 async and await keywords and we'll see how you can use them to write better asynchronous code in your Angular 7/8 apps with an example using HttpClient for sending HTTP requests and RxJS Observables.

05 Sep 2019

Read article

ES6 Modules - Import, Export & Default for React Native Devs

In this article, we'll focus on understanding the import, export and default keywords used in ES6 modules

08 Aug 2019

Read article

FormData Explained + Ajax, Angular 9, Ionic 5, and React Examples

16 Jul 2019

Read article

Constant in JavaScript: const vs. Object.freeze()

In this tutorial, we'll look at the difference between `const` and `Object.freeze()` in JavaScript.

18 Jun 2019

Read article

JavaScript ES6 & Node Spread Operator Syntax

In this post, you will learn about the JavaScript Spread syntax or operator.

11 Jun 2019

Read article

JavaScript ES6 Three Dots Syntax (...): Spread vs. Rest Operators

In this post, you will learn the difference between the Spread and the Rest operators in JavaScript.

11 Jun 2019

Read article

JavaScript ES6 Arrow Function Default Parameters & Multiple Return Values

In this post, you will learn about the JavaScript function default parameters and return values.

11 Jun 2019

Read article

JavaScript ES6 by Example — Array.find() & Array.findIndex()

Array.find() and Array.findIndex() are two new methods in JavaScript ES6. They make searching arrays more easier than before without writing cumbersome code and loops.

22 Apr 2019

Read article

JavaScript Interview Questions & Solutions

JavaScript Interview Questions & Solutions

29 Dec 2018

Read article

React 16.6 New Features: React.memo() and Suspense/React.lazy()

We'll learn about important new features of React such as React.memo() and React.lazy()

30 Oct 2018

Read article

JavaScript ES6 Tutorial for Django Developers

15 Aug 2018

Read article

Node.js Tutorial & Examples (Node.js 10)

Node.js tutorial for biginners

04 Aug 2018

Read article

RxJS 6 for Angular Developers Tutorial by Example

In this RxJS 6 tutorial you'll learn about the latest version of RxJS, a library that implements Reactive programming in JavaScript. You'll learn about the core RxJS 6 concepts such as Observables, Observers, Subjects, Streams, Subscriptions and Operators.

18 Jul 2018

Read article

JavaScript Array.from() (NodeList and arguments)

In this example, we'll see how to use the Array.from() method to convert array-like and iterable objects to JavaScript Arrays.

11 Jul 2018

Read article

querySelector, querySelectorAll and forEach By Example

In this example, we'll see how to use the querySelector() method, the querySelectorAll() method and forEach() to iterate over a NodeList object.

10 Jul 2018

Read article

HTML5 History API

The HTML5 History API allows you to control the browser history from JavaScript. For example, you can navigate the history stack and set the URL of the address bar dynamically and without a full-page refresh

10 Jul 2018

Read article

HSL (and HSLa) Colors in CSS

In this example, we'll learn to use the HSL (and HSLa) color scheme for defining colors in CSS.

10 Jul 2018

Read article

Ionic 4/Angular Tutorial - Ionic 4 Router (Routing and Navigation Example)

Throughout this tutorial, we'll see how to add routing to Ionic 4 with the Angular 6 router

25 Jun 2018

Read article

Ionic 4 Upgrade: Updating From Ionic 3 to Ionic 4/Angular 6

Throughout this tutorial, we'll see how to upgrade your Angular 6 project to use RxJS 6

20 Jun 2018

Read article

Angular 6 Upgrade: Migrating to RxJS 6

Throughout this tutorial, we'll see how to upgrade your Angular 6 project to use RxJS 6

19 Jun 2018

Read article

Vue Axios Tutorial by Example (CRUD API)

Throughout this tutorial with Vue.js and Axios we'll see how to add CRUD (Create, Read, Update and Delete) methods with a Vue front-end and a Python Django RESTful API back-end.

13 Jun 2018

Read article

Learn Angular: Full-Stack & CRUD Angular 7/8 PDF Tutorial

In this Angular 7/8 PDF tutorial, you'll going to learn how to build full-stack web applications with Angular 8 and a Python back-end.

09 Jun 2018

Read article

React Router Redux Tutorial

In this tutorial we'll look at how to use react-router-redux (previously known as redux-simple-router) to control the URL as a part of the application state.

29 May 2018

Read article

Angular 6|5 Tutorial: Integrating Angular with Django

In this tutorial we'll see how we can integrate the Angular 6 front-end application with the Django back-end.

29 May 2018

Read article

Ionic 4 Tutorial for Beginners: Custom Elements, Buttons, Navs and Tabs

Ionic 4 Tutorial for Beginners: Custom Elements, Buttons, Navs and Tabs

14 Apr 2018

Read article

Ionic 4/Angular Tutorial for Beginners: Learn Ionic Properly To Build Native and Progressive Web Apps [Study Guide v0.1]

Learn Ionic 4 Properly (A Study / Learning Guide)

12 Apr 2018

Read article

Single Page Apps with Flask and Angular 4|5 Tutorial Series

In this tutorial series we'll be using Python, Flask, SQLAlchemy and Angular 5 to build a modern RESTful web application with an architecture that consists of a front-end application with Angular 5 and a back-end REST API using Flask.

04 Apr 2018

Read article

Building a PWA with Stencil

In this tutorial we'll get started using Stencil and learn the very first basics then next we'll build a simple real world PWA.

17 Feb 2018

Read article

A Re-Introduction to Ionic (Ionic 4+, PWAs, Stencil, Capacitor and Electron)

If you have been following with the Ionic framework then you'll have probably noticed the buzz around some new technologies/tools and concepts mainly PWAs (Progressive Web Apps), Stencil, Capacitor and Native PWAs. Are you confused/worried by all that? Don't be It's all related and has one ultimate goal which is to make Ionic a powerful framework-agnostic library for building mobile (progressive) web apps that have first class access to native device features.

16 Feb 2018

Read article

Handling CORS in Express 4

So in this tutorial you'll learn how to enable CORS in your Express 4 server to enable your front-end application to bypass the Same Origin Policy enforced by modern web browsers.

21 Jan 2018

Read article

Building a Fake and JWT Protected REST API with json-server

In this tutorial we'll see how to create a fake REST API with json-server, how to generate fake data with faker.js and how to add JWT authentication with jsonwebtoken

15 Jan 2018

Read article

How To Use External Plain JavaScript Libraries in TypeScript Projects

How To Use External Plain JavaScript Libraries in TypeScript Projects

06 Jun 2017

Read article

[TIP] Pure JavaScript equivalent or alternative to jquery.ready()

Throughout this post we are going to see a pure JavaScript equivalent or alternative to the jquery.ready() method

09 Jan 2017

Read article