Skip to content

Provided this.updateQuery(Object) mixin for updating query string, for Vue 1.x | 2.x

Notifications You must be signed in to change notification settings

OneWayTech/vue-update-query-mixin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vue update-query mixin

npm version npm download

Intellectual property of Oneway.mobi

Requirements

  • Vue 1.x | 2.x
  • Vue Router 0.7.x | 2.x

Installation

npm i vue-update-query-mixin -S

Usage

// This is a Vue component
import updateQuery from 'vue-update-query-mixin'

export default {
  mixins: [updateQuery],
  ...
}

From now on, this.updateQuery is available within the component

Example

Current url: http://demo.com/#!/test?a=1&b=2
After Running: this.updateQuery({ a: 2, b: 3 })   url changed to: http://demo.com/#!/test?a=2&b=3

This mixin is based on update-query

About

Provided this.updateQuery(Object) mixin for updating query string, for Vue 1.x | 2.x

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published