У меня была та же проблема. Я закончил импорт <iron-ajax>
прямо из GitHub (через rawgit).
<head>
<base href="http://polygit.org/polymer+1.4.0/components/">
<link rel="import" href="polymer/polymer.html">
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="https://cdn.rawgit.com/PolymerElements/iron-ajax/v1.2.0/iron-ajax.html">
</head>
<body>
<x-foo></x-foo>
<dom-module id="x-foo">
<template>
<div>Please wait...</div>
<iron-ajax id="ajax"
auto
url="http://jsonplaceholder.typicode.com/users/"
last-response="{{data}}"
handleAs="json">
</iron-ajax>
<table>
<template is="dom-repeat" items="[[data]]">
<tr>
<td>[[item.id]]</td>
<td>[[item.name]]</td>
<td>[[item.email]]</td>
</tr>
</template>
</table>
</template>
<script>
HTMLImports.whenReady(function() {
Polymer({
is: 'x-foo'
});
});
</script>
</dom-module>
</body>
jsbin
Вы увидите несколько ошибок консоли относительно polymer.html
и promise-polyfill-lite.html
, но вы можете загрузить те из Polygit перед импортом <iron-ajax>
.