Skip to content

Instantly share code, notes, and snippets.

View HenningKlokkeraasen's full-sized avatar

Henning Klokkeråsen HenningKlokkeraasen

View GitHub Profile
@HenningKlokkeraasen
HenningKlokkeraasen / ko.extendes.urlSync.js
Last active August 16, 2016 13:43 — forked from kamranayub/ko.extendes.urlSync.js
Knockout Extender: URLSync - syncs observable value with URL hash
/**
* An extender that syncs the observable with the address
* bar (using hash fragment). Will load from URL hash or
* querystring (at time of creation) and will
* update hash when observable changes.
*
* Options: string|object
* String: Query parameter key to get/set
* Object:
* - param - Query parameter key to get/set