beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

SetLocationHash Op

Ops.Website.SetLocationHash


SetLocationHash
Namespace: Ops.Website

Op author: stephan

sets window.location.hash to the specified value(s)


summary (oneliner)

allows to manipulate window.location.hash to store data in the url without reloading the page.

given a hash in the first parameter, the op will simply replace the whole part behind the # in the url with the given hash.



doc

issues

example patch id

youtube id

caniuse query

collections

related ops

Inputs

Hash (String)

new value for window.location.hash (without the #)


Update (Trigger)

Active (boolean /Number)

active/inactive


Silent (boolean /Number)

make event not trigger LocationHashRoute op


Allow Empty (boolean /Number)

allow for setting an empty hash, usually triggers a page reload


Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save

LocationHash Example

how to use the browser location bar to navigate and create deeplinks

Open Example In Editor


Youtube Video Tutorial

Patches using SetLocationHash

Changelog


created op
2021-03-30 - stephan

added lib: navigo.js
2021-03-30 - stephan

Ops.User.stephan.SetLocationHash renamed to Ops.Website.SetLocationHash
2021-03-30 - stephan