Home » JavaScript (page 4)

JavaScript

Dockerizing Node.js Applications

Containers are one of the best ways to deploy Node.js applications these days. In this post, you will learn how you can containerize your Node.js applications using Docker. First, we will create a simple web application in Node.js, then we’ll build the Docker image and run it. You’ll also learn a few tips and tricks to make development easier and ...

Read More »

Angular 5.0 New things

Angular team has released Angular 5.0 on 1st Nov 2017. They focused on most new features and bug fixes. This release continues our focus on making Angular smaller, faster, and easier to use. Following things are New: Angular CLI 1.5 and Angular 5.0.0 Now we are in CLI 1.5, if you install CLI 5.0, automatically you will get the angular ...

Read More »

Angular 4: Service example

Welcome to Angular 4 services Angular services are for building out code that can be shared across multiple components. And these are singletons. services restrict the instantiation of a class to one object. It means the methods and properties can be shared throughout your application from a single shared instance. These services are best way to store the session data ...

Read More »

WTF code, defects, and the principle of least astonishment

We have recently introduced two defects, while trying to improve old, obscure code. Of course we are to blame for not being more paranoid and not researching more why the code was there. But if the code was clear to start with, if it followed the least astonishment principle, the errors wouldn’t have happened. In both cases the original code provoked ...

Read More »

Demystifying the concepts of ‘Asynchronous JavaScript’

Javascript has been one of the vital constituents for application development nowadays in the world of information technology. Every application that is developed now is web-based, and when it comes to accessing the application through the web browser, you got to depend on javascript. So, this blog is basically about breaking down the concepts of asynchronous requests in javascript which ...

Read More »

Using Mustache.js for Client-Side Templating

Introduction In this article, I will show you how to make use of Mustache.js for client-side templating. In this approach, we get the JSON data from an API, developed by you or a 3rd party API and build the HTML required for rendering the data at the client side. We will make use of GitHub APIs to demonstrate this technique. ...

Read More »

Angular 4: Component Example

Welcome to the new concept of components in angular 4. Definition: component is a angular class , Components are the most basic building block of an UI in an Angular application. An Angular application is a tree of Angular components. Components always have a template and only one component can be instantiated per an element in a template. A component ...

Read More »

Fixing npm (Node Package Manager) permissions

In our day to day life, we come across javascript libraries that we require as project dependencies. So to get the required dependencies for javascript we require a package manager which is well known as npm or Node Package Manager. But, sometimes we do face problems with the permissions of npm. The most common of them being the EACCESS error, ...

Read More »

Angular 4 Installation

Angular 4 Framwork Welcome to Angular, it is faster, most powerfull framework. And it’s SPA(single page application), it will use only one index.html, whatever you use all  htmls will come under this index.html body tag. Topic: Angular 4 installation: In this section we will learn, How to install the angular 4 in your system. you will see the basic angular ...

Read More »