Skip to content

This is a plugin to add, update and remove data to url params without reloading the webpage.

License

Notifications You must be signed in to change notification settings

baralmanish/PushDataToUrl

Repository files navigation

Push to URL parameters

This is a plugin to add, update and remove data to url params without reloading the webpage.

Setup Commands

  • npm install - Install npm packages
  • npm run build - Babel will transpile ES6 => ES5 and minify the code.
  • npm run prepublish - Hook for npm. Do all the checks before publishing your module.

Installation

npm i push-data-to-url

  • Package Manager: PM> Install-Package PushDataToUrl
  • .Net CLI: > dotnet add package PushDataToUrl
  • Paket CLI: > paket add PushDataToUrl

DEMO

To view the demo please click here

Implementation

Initialize

var pushToUrl = new pushToUrl();

Add

pushToUrl.add({key: 'name', value: 'John'});

Get Value of Selected Key

pushToUrl.get('name');

Remove Selected Key

pushToUrl.remove('name');

Remove All

pushToUrl.removeAll();