iron-location
A Polymer element that manages binding to the page's URL.
iron-location
The iron-location elements manage bindings to and from the current URL and query parameters. See: Documentation, iron-location demo, iron-query-params demo.
<iron-location>
The iron-location
element manages binding to and from the current URL.
<iron-query-params>
The iron-query-params
element manages serialization and parsing of query
parameter strings.
Usage
Installation
npm install --save @polymer/iron-location
In an html file
<iron-location>
<html>
<head>
<script type="module">
import '@polymer/iron-location/iron-location.js';
</script>
</head>
<body>
<iron-location
path="/social/profiles"
hash="profilePicture"
query="userId=polymer&display=dark"
dwell-time="1000">
</iron-location>
</body>
</html>
<iron-query-params>
<html>
<head>
<script type="module">
import '@polymer/polymer/lib/elements/dom-bind.js';
import '@polymer/iron-location/iron-location.js';
import '@polymer/iron-location/iron-query-params.js';
</script>
</head>
<body>
<dom-bind>
<template>
<iron-location
path="/social/profiles"
hash="profilePicture"
query="{{paramsString}}"
dwell-time="1000">
</iron-location>
<iron-query-params
id="queryParams"
params-string='{{paramsString}}'
params-object='{"userId": "polymer", "display": "dark"}'>
</iron-query-params>
</template>
</dom-bind>
</body>
</html>
In a Polymer 3 element
<iron-location>
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/iron-location/iron-location.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<iron-location
path="/social/profiles"
hash="profilePicture"
query="userId=polymer&display=dark"
dwell-time="1000">
</iron-location>
`;
}
}
customElements.define('sample-element', SampleElement);
<iron-query-params>
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/iron-location/iron-location.js';
import '@polymer/iron-location/iron-query-params.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<iron-location
path="/social/profiles"
hash="profilePicture"
query="{{paramsString}}"
dwell-time="1000">
</iron-location>
<iron-query-params
id="queryParams"
params-string='{{paramString}}'
params-object='{"userId": "polymer", "display": "dark"}'>
</iron-query-params>
`;
}
}
customElements.define('sample-element', SampleElement);
Contributing
If you want to send a PR to this element, here are the instructions for running the tests and demo locally:
Installation
git clone https://github.com/PolymerElements/iron-location
cd iron-location
npm install
npm install -g polymer-cli
Running the demo locally
polymer serve --npm
open http://127.0.0.1:<port>/demo/
Running the tests
polymer test --npm
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- @polymer/polymer#^3.0.0
- Released
- 2018-09-14
- Maturity
- IMPORTED
- License
- BSD 3-clause "New" or "Revised" License
Compatibility
- Framework
- Polymer 1.0+
- Polymer 3.0+
- Polymer 2.0+ in 2.2.2
- Browser
- Browser Independent
iron-location - Vaadin Add-on Directory
A Polymer element that manages binding to the page's URL.View on NPM
View on GitHub
Online Demo
GitHub Homepage
Documentation
Issue tracker
iron-location version 0.7.0
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.7.1
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.7.2
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.7.3
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.0
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.1
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.2
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.3
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.4
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.5
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.6
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.7
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.8
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.9
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.10
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 0.8.11
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 1.0.0
### Dependencies
* polymer#Polymer/polymer#^1.0.0
iron-location version 2.0.0
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 2.0.1
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.1
### Dependencies
* @polymer/polymer#^3.0.0-pre.1
iron-location version 2.0.2
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 2.0.3
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.2
### Dependencies
* @polymer/polymer#^3.0.0-pre.1
iron-location version 3.0.0-pre.3
### Dependencies
* @polymer/polymer#^3.0.0-pre.3
iron-location version 3.0.0-pre.4
### Dependencies
* @polymer/polymer#^3.0.0-pre.4
iron-location version 3.0.0-pre.6
### Dependencies
* @polymer/polymer#^3.0.0-pre.6
iron-location version 3.0.0-pre.7
### Dependencies
* @polymer/polymer#^3.0.0-pre.7
iron-location version 2.1.0
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.8
### Dependencies
* @polymer/polymer#^3.0.0-pre.7
iron-location version 2.1.1
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.10
### Dependencies
* @polymer/polymer#^3.0.0-pre.10
iron-location version 2.2.0
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.11
### Dependencies
* @polymer/polymer#^3.0.0-pre.10
iron-location version 3.0.0-pre.12
### Dependencies
* @polymer/polymer#3.0.0-pre.12
iron-location version 3.0.0-pre.13
### Dependencies
* @polymer/polymer#^3.0.0-pre.13
iron-location version 3.0.0-pre.14
### Dependencies
* @polymer/polymer#^3.0.0-pre.13
iron-location version 3.0.0-pre.15
### Dependencies
* @polymer/polymer#^3.0.0-pre.13
iron-location version 3.0.0-pre.16
### Dependencies
* @polymer/polymer#^3.0.0-pre.13
iron-location version 2.2.1
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.17
### Dependencies
* @polymer/polymer#^3.0.0-pre.13
iron-location version 3.0.0-pre.18
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.19
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 2.2.2
### Dependencies
* polymer#Polymer/polymer#1.9 - 2
iron-location version 3.0.0-pre.20
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.21
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.22
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.23
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.24
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.25
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0-pre.26
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.0
### Dependencies
* @polymer/polymer#^3.0.0
iron-location version 3.0.1
### Dependencies
* @polymer/polymer#^3.0.0