JavaScript

Unit Testing of Angular Service with HttpClient

Services are basically used to allow your code to share the common functionality across the application. Services play a vital role in every Angular application and promote the reusability of code. And to verify that our services are working properly or not we need to test it using unit testing. First and Foremost thing we’ll do is to create the service which is to be Continue Reading

RxJS Subject and its variants

SUBJECT Subject acts as an observable and observer both which do both listen to new notifications and also send/broadcast it to any dedicated component which subscribes to it. So the first step is to import “subject” in your typescript file. import { Subject } from “rxjs/Subject”; and now quickly create a Subject with just a simple line code written below: let newSubject = new Subject(); Continue Reading

Develop Chrome Extension using Angular 7 | Part – 1

Extensions are the small software programs that are used to customize the experience of browsing. They enable the user to customize the browser’s functionality and behavior to individual needs or requirements. An extension is basically there to fulfill a single purpose that is narrow defines and easy to understand. Chrome extensions are in demand because they add features to Chrome browser to do functionalities/things easier Continue Reading

DOM Manipulation Using D3.js

D3 (Data-Driven Documents or D3.js) is a JavaScript library for visualizing data using web standards. It is an open-source JavaScript library developed by Mike Bostock to create custom interactive data visualizations in the web browser using SVG, HTML, and CSS. giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data.

Manipulating Server returned dates at client Side in Angular

Hey Visitor, Have you ever faced an issue with the date values on your website, when the date and time returned from server doesn’t change according to the client timezone , for eg. values returned from server at US will be different for a client at India so we need to manipulate the received time according to Indian Time Zone. So recently, I encountered this Continue Reading

PJAX: Loading your website faster!

We all hate waiting for websites to load before we can start using or surfing it. Internet has a come a long way with great speeds to decrease this time, but this has just made the user more impatient. After a lot of research through the decade, it has been found out that on an average a user would not wait for more than 4 Continue Reading

Getting started with Moment.js: Intro with examples.

I think date manipulation is most common process that every developer must deal in his career. There are so many tools available for Date Manipulation in JavaScript like datejs, date-fns and so many interesting library. Moment.js is one of them. Developer can easily interact with date and time domain problems by using Moment.js. JavaScript Date requires lines of code for parsing , manipulation and validation. Continue Reading

Knolx: Introduction to ReactJs

Hi all, Knoldus has organized a 30 min session on 1st September 2017. The topic was “Introduction to React JS”. Many people have joined and enjoyed the session. I am going to share the slides here. Please let me know if you have any question related to linked slides or video. The slides of the KnolX are here: And Here’s the video of the session: Continue Reading

Testing HTTP services in Angular

Prerequisites : 1. Understanding of Angular. 2. Understanding of Component’s unit tests in Angular 3. Understanding of Karma and Jasmine Http Service Let’s consider a simple service to get data using get method of Http service. Let’s start with writing a test case for this service. Configuring Testing Module for Service:

How data is handled between Components in React (State vs Props)

Prerequisites : Basic understanding of React. Here’s a blog you can refer to : Getting Started with React PROPS Every component in react have a property called props associated to it. This lets you make a single component that is used in many different places in your app, with slightly different properties in each place. If we write a react component in es5, it’s nothing Continue Reading

Getting Started with React

React (sometimes called React.js or ReactJS) is an open-source JavaScript library for building user interfaces. It allows developers to create large web-applications that use data that can change over time, without reloading the page. It aims primarily to provide speed, simplicity and scalability. React is flexible. You can create a separate project on react, or you can add it to an existing code base of Continue Reading

Understand closures in javascript

Let’s learn closures today, How closures are define how they got intialize and how they work A closure is a function within a function that has access to the environment that it was created, which gives the ability to access the private methods of outer function to their inner function. In simple words function which is return by another function called closures. A closure is Continue Reading

Validations for Template-driven forms in Angular 4

Validations for Template-driven forms in Angular 4: Prerequisite : Basic understanding of Angular 2/4 First of all, we need to create a simple form in Angular. You can clone this repository for the example. We’ll continue further with this example. This is the form that we have in AppComponent : <div class=”container”> <div class=”row”> <form #myForm=”ngForm” (ngSubmit)=”submitForm()”> <div class=”row”> <div class=”col-md-4 col-md-offset-4″> <h1>Form Validations</h1> </div> Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!