Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: third_party/polymer/v1_0/components-chromium/app-route/app-location.html

Issue 1984963002: Roll Polymer elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/app-route/app-location.html
diff --git a/third_party/polymer/v1_0/components-chromium/app-route/app-location.html b/third_party/polymer/v1_0/components-chromium/app-route/app-location.html
new file mode 100644
index 0000000000000000000000000000000000000000..4cfc108ce52b8720ead6f824fbbfaee490f96fe1
--- /dev/null
+++ b/third_party/polymer/v1_0/components-chromium/app-route/app-location.html
@@ -0,0 +1,58 @@
+<!--
+@license
+Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+--><html><head><link rel="import" href="../polymer/polymer.html">
+<link rel="import" href="../iron-location/iron-location.html">
+<link rel="import" href="../iron-location/iron-query-params.html">
+<link rel="import" href="app-route-converter-behavior.html">
+
+<!--
+`app-location` is an element that provides synchronization between the
+browser location bar and the state of an app. When created, `app-location`
+elements will automatically watch the global location for changes. As changes
+occur, `app-location` produces and updates an object called `route`. This
+`route` object is suitable for passing into a `app-route`, and other similar
+elements.
+
+An example of the public API of a route object that describes the URL
+`https://elements.polymer-project.org/elements/app-route-converter?foo=bar&baz=qux`:
+
+ {
+ prefix: '',
+ path: '/elements/app-route-converter'
+ }
+
+Example Usage:
+
+ <app-location route="{{route}}"></app-location>
+ <app-route route="{{route}}" pattern="/:page" data="{{data}}"></app-route>
+
+As you can see above, the `app-location` element produces a `route` and that
+property is then bound into the `app-route` element. The bindings are two-
+directional, so when changes to the `route` object occur within `app-route`,
+they automatically reflect back to the global location.
+
+A `app-location` can be configured to use the hash part of a URL as the
+canonical source for path information.
+
+Example:
+
+ <app-location route="{{route}}" use-hash-as-path></app-location>
+
+@element app-location
+@demo demo/index.html
+-->
+</head><body><dom-module id="app-location">
+ <template>
+ <iron-location path="{{__path}}" query="{{__query}}" hash="{{__hash}}" url-space-regex="{{urlSpaceRegex}}">
+ </iron-location>
+ <iron-query-params params-string="{{__query}}" params-object="{{queryParams}}">
+ </iron-query-params>
+ </template>
+ </dom-module>
+<script src="app-location-extracted.js"></script></body></html>

Powered by Google App Engine
This is Rietveld 408576698