Home » JavaScript » Page 20

JavaScript

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 »

Get Started with vue-test-utils and Jest

In late September, Vue.js released the beta of vue-test-utils. Let’s take this opportunity to dive a little deeper and take a look at the official Vue testing solution named vue-test-utils. We’ll be using Jest for testing. For us at Codeship, it turned out to be an excellent tool that’s fast and reliable when it comes to continuously running JavaScript unit ...

Read More »

Apps Script Navigator: UrlFetchApp Empowered with Cookie Management, Re-login and Much More!

If you are a fan of Google Apps Script, you would definitely have played around with its UrlFetchApp module, offering a convenient HTTP(S) client interface. As a frequent user of the module, although I admit that it is really cool, I always felt I needed a richer client, capable of handling stuff like automatic cookie management, proper redirection and logout ...

Read More »