{"id":24488126,"url":"https://github.com/polymerelements/iron-location","last_synced_at":"2025-04-05T17:07:47.008Z","repository":{"id":2734319,"uuid":"44563392","full_name":"PolymerElements/iron-location","owner":"PolymerElements","description":"A Polymer element that manages binding to the page's URL.","archived":false,"fork":false,"pushed_at":"2023-10-16T14:02:53.000Z","size":523,"stargazers_count":22,"open_issues_count":34,"forks_count":41,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-05-15T13:47:09.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolymerElements.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-19T20:52:59.000Z","updated_at":"2024-06-18T13:56:50.858Z","dependencies_parsed_at":"2024-06-18T13:56:47.528Z","dependency_job_id":"81dea944-e5c0-49ed-bc9c-c039fdd41a4a","html_url":"https://github.com/PolymerElements/iron-location","commit_stats":{"total_commits":294,"total_committers":24,"mean_commits":12.25,"dds":0.6904761904761905,"last_synced_commit":"8bdb632adbdf5de8d16e33ef55d1c732ea373750"},"previous_names":["polymerelements/iron-page-url"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolymerElements","download_url":"https://codeload.github.com/PolymerElements/iron-location/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369952,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T16:18:23.325Z","updated_at":"2025-04-05T17:07:46.984Z","avatar_url":"https://github.com/PolymerElements.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Published on NPM](https://img.shields.io/npm/v/@polymer/iron-location.svg)](https://www.npmjs.com/package/@polymer/iron-location)\n[![Build status](https://travis-ci.org/PolymerElements/iron-location.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-location)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/@polymer/iron-location)\n\n## iron-location\nThe iron-location elements manage bindings to and from the current URL and query\nparameters.\nSee: [Documentation](https://www.webcomponents.org/element/@polymer/iron-location),\n  [iron-location demo](https://www.webcomponents.org/element/@polymer/iron-location/demo/demo/index.html),\n  [iron-query-params demo](https://www.webcomponents.org/element/@polymer/iron-location/demo/demo/iron-query-params.html).\n\n### \u0026lt;iron-location\u0026gt;\n\nThe `iron-location` element manages binding to and from the current URL.\n\n### \u0026lt;iron-query-params\u0026gt;\n\nThe `iron-query-params` element manages serialization and parsing of query\nparameter strings.\n\n## Usage\n\n### Installation\n```\nnpm install --save @polymer/iron-location\n```\n\n### In an html file\n\n##### \u0026lt;iron-location\u0026gt;\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript type=\"module\"\u003e\n      import '@polymer/iron-location/iron-location.js';\n    \u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ciron-location\n        path=\"/social/profiles\"\n        hash=\"profilePicture\"\n        query=\"userId=polymer\u0026display=dark\"\n        dwell-time=\"1000\"\u003e\n    \u003c/iron-location\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### \u0026lt;iron-query-params\u0026gt;\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript type=\"module\"\u003e\n      import '@polymer/polymer/lib/elements/dom-bind.js';\n      import '@polymer/iron-location/iron-location.js';\n      import '@polymer/iron-location/iron-query-params.js';\n    \u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdom-bind\u003e\n      \u003ctemplate\u003e\n        \u003ciron-location\n            path=\"/social/profiles\"\n            hash=\"profilePicture\"\n            query=\"{{paramsString}}\"\n            dwell-time=\"1000\"\u003e\n        \u003c/iron-location\u003e\n        \u003ciron-query-params\n            id=\"queryParams\"\n            params-string='{{paramsString}}'\n            params-object='{\"userId\": \"polymer\", \"display\": \"dark\"}'\u003e\n        \u003c/iron-query-params\u003e\n      \u003c/template\u003e\n    \u003c/dom-bind\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### In a Polymer 3 element\n\n##### \u0026lt;iron-location\u0026gt;\n```js\nimport {PolymerElement, html} from '@polymer/polymer';\nimport '@polymer/iron-location/iron-location.js';\n\nclass SampleElement extends PolymerElement {\n  static get template() {\n    return html`\n      \u003ciron-location\n          path=\"/social/profiles\"\n          hash=\"profilePicture\"\n          query=\"userId=polymer\u0026display=dark\"\n          dwell-time=\"1000\"\u003e\n      \u003c/iron-location\u003e\n    `;\n  }\n}\ncustomElements.define('sample-element', SampleElement);\n```\n\n#### \u0026lt;iron-query-params\u0026gt;\n```js\nimport {PolymerElement, html} from '@polymer/polymer';\nimport '@polymer/iron-location/iron-location.js';\nimport '@polymer/iron-location/iron-query-params.js';\n\nclass SampleElement extends PolymerElement {\n  static get template() {\n    return html`\n      \u003ciron-location\n          path=\"/social/profiles\"\n          hash=\"profilePicture\"\n          query=\"{{paramsString}}\"\n          dwell-time=\"1000\"\u003e\n      \u003c/iron-location\u003e\n      \u003ciron-query-params\n          id=\"queryParams\"\n          params-string='{{paramString}}'\n          params-object='{\"userId\": \"polymer\", \"display\": \"dark\"}'\u003e\n      \u003c/iron-query-params\u003e\n    `;\n  }\n}\ncustomElements.define('sample-element', SampleElement);\n```\n\n## Contributing\nIf you want to send a PR to this element, here are\nthe instructions for running the tests and demo locally:\n\n### Installation\n```sh\ngit clone https://github.com/PolymerElements/iron-location\ncd iron-location\nnpm install\nnpm install -g polymer-cli\n```\n\n### Running the demo locally\n```sh\npolymer serve --npm\nopen http://127.0.0.1:\u003cport\u003e/demo/\n```\n\n### Running the tests\n```sh\npolymer test --npm\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerelements%2Firon-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolymerelements%2Firon-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerelements%2Firon-location/lists"}