Below is a service that can be used to get the previous url from angular router where it is navigated via router or browser’s back button // Service import { Injectable } from ‘@angular/core’; import { Router, RouterEvent, NavigationEnd } from ‘@angular/router’; /** A router wrapper, adding extra functions. */ @Injectable() export class RouterExtService {…
Tag: javascript
RxJS – Caching http requests
This post entails caching http request using RxJS. This is for advanced users who are familiar with RxJS and Angular2+.
Node.js – How to enable Cross Origin Resource Sharing (CORS)
This post entails adding access control headers in Node.js to enable CORS.
Node.js – Using Zlib for compressing and decompressing files
Compression and Decompression made easier with built-in Node.js libraries.
React JS – How to build graphs using Google charts
Building interactive graphs and visualisation tools using Google charts and React js.
Displaying hierarchical objects linearly in AngularJS using ng-repeat
This post shows how to display parent, child and grandchild relationship in tabular form using AngularJS ng-repeat.
Avoiding watches in AngularJS for faster data bindings
This post provides ways to avoid creating watches in AngularJS and tries to solve the issue of 2000 watches.
Cache busting document links with jQuery
An easy way of cache busting links using jQuery.
Flot chart tips – Rotating axis labels
This post is about rotating axis labels in flot charts for better rendering!
Flot chart tips – Passing custom data to flot charts
How to pass custom data to flot charts for rendering.