| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --> |
| 10 <html> |
| 11 <head> |
| 12 |
| 13 <title>iron-ajax</title> |
| 14 |
| 15 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 16 <link rel="import" href="../iron-ajax.html"> |
| 17 <link rel="import" href="../../iron-image/iron-image.html"> |
| 18 <link rel="import" href="../../paper-styles/classes/typography.html"> |
| 19 <link rel="import" href="../../iron-flex-layout/classes/iron-flex-layout.html"
> |
| 20 <link rel="stylesheet" href="../../paper-styles/demo.css"> |
| 21 <style> |
| 22 iron-image { |
| 23 background-color: lightgray; |
| 24 margin: 1em; |
| 25 } |
| 26 </style> |
| 27 </head> |
| 28 <body> |
| 29 |
| 30 <template is="dom-bind"> |
| 31 <iron-ajax auto url="//gdata.youtube.com/feeds/api/videos/" |
| 32 params='{"alt":"json", "q":"polymer"}' |
| 33 handle-as="json" last-response="{{ajaxResponse}}"></iron-ajax> |
| 34 <h1>Video Feed</h1> |
| 35 <section class="flex layout horizontal wrap"> |
| 36 <template is="dom-repeat" items="[[ajaxResponse.feed.entry]]"> |
| 37 <a href="[[item.link.0.href]]" target="_blank"> |
| 38 <iron-image src="[[item.media$group.media$thumbnail.0.url]]" width="25
6" height="256" sizing="cover" preload fade></iron-image> |
| 39 </a> |
| 40 </template> |
| 41 </section> |
| 42 </template> |
| 43 |
| 44 </body> |
| 45 </html> |
| OLD | NEW |