AngularJs2.0

Prevent user from losing unsaved data

Reading Time: 3 minutes There are many instances where a user fills some details in the form, edit their details, or secure the form in such a way that if someone navigates away or closes the browser tab, they should be prompted to confirm that they really want to leave the form with unsaved data. Whenever these kind instances occur you will see an alert appear on the top of Continue Reading

Angular Lifecycle Hooks

Reading Time: 4 minutes Every Angular component has a lifecycle. A component has a lifecycle managed by Angular itself. Angular manages creation, rendering, data-bound properties, etc. Every Angular component and Angular directive have a lifecycle and the following information can be applied to both. In this blog, we will learn more about Angular Lifecycle Hooks. What is Angular Lifecycle? Each Angularjs version goes through various phases in its lifecycle. Continue Reading

Angular application with REST backend solution

Reading Time: 3 minutes We always need interaction between backend and frontend for creating a successful application, but it takes time to integrate backend with the frontend, while they both are working parallelly. So for those who need a fast development without waiting for the backend to create Rest backend with Mock data is a solution for this situation. We use JSON Server to make this possible and help Continue Reading

Unit Testing of Angular Service with HttpClient

Reading Time: 4 minutes 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

DOM Manipulation Using D3.js

Reading Time: 4 minutes 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

Reading Time: 2 minutes 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

Fusion of Observables with Observer

Reading Time: 3 minutes RxJs is an incredible tool for reactive programming, and today we’re going to understand briefly about what Observables and observers are. OBSERVABLES Observables are wrapping around of some data source like a stream of values of any type which are typically used for asynchronous data. It is used for transfer of messages between publisher and subscriber and that message could be anything like literals, messages, Continue Reading

Testing HTTP services in Angular

Reading Time: 2 minutes 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. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode Continue Reading

Using Http services for storing and fetching user info: Angular 2

Reading Time: 2 minutes Using Angular 2 Http get, post services is the most essential requirement when you are working on any Angular 2 app because anyhow you will have the scenario to store some user information from your end and you have to fetch some information from their end as well if you know what I mean. So here in this blog, we are going to create an Continue Reading

Using Resolve -Promises in Angular 2 Http Services

Reading Time: 2 minutes You have a huge list of users that you have to show on one of the views in angular 2 app, you called the action to redirect to users list view and the page is blank because your HTTP service is still loading the list of users from the external API and until it grabs all the list it can’t show anything on the view, isn’t Continue Reading

Location Strategy- Routing in Angular2

Reading Time: 5 minutes Angular 2’s router is super easy to use. Angular 2 gives you the possibility of dividing your application into several views that you can navigate between through the concept of routing. Routing enables you to route the user to different components based on the url that they type on the browser, or that you direct them to through a link. This post will cover standard  Continue Reading

Validations for Template-driven forms in Angular 4

Reading Time: 5 minutes 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

When I took Angular 2 to build my Application

Reading Time: 2 minutes When I took Angular 2 to build my application, I still had my doubts to go with Angular 2 or some other framework. But after some research, I decided to go with Angular 2. It gives the ability to make Single Page Application in a perfect and viable way. Here are some others reasons / advantages I liked: 1. TypeScript : Unlike javascript, typescript is Continue Reading