iron-ajax… wat?! -- Polycasts #26
Why Stack Overflow recommends it
Stack Overflow users link it when answering Polymer questions about iron-ajax, especially how to bind last-response to other elements and call web APIs.
Recommended by 2 people across 2 different months, 2015 to 2016.
What it is
Episode 26 of the Polycasts series from the Chrome team shows how to use Polymer's iron-ajax element to make AJAX requests declaratively in HTML. It walks through building a small GitHub issue fetcher, using data binding to cut most of the JavaScript out of the app.
What people said
Recommends Jeremy Odekirk · 2015-10 · Stack Overflow · on “strategies for calling ASP.Net WebAPI services inside Polymer element”
I use the iron-ajax component to get data from my ASP.Net API. There's a good YouTube demo created recently: [this video]
Recommends jean Pokou · 2016-02 · Stack Overflow · on “Polymer Iron-Ajax Does not Display Data”
You are not binding iron-ajax last-response attribute to any of your polymer element properties, it's supposed to be : last-response = "{{ajaxResponse}}" . In addition the amazon request need to be loaded over https . Here is Plunkr [LINK] to see it in action. You can check this PolyCast on iron-ajax [this video] if you want to learn more. <dom-module id="first-element"> <template> <!-- Stylesheet--> <style> ::host { display: block; } .icon{ width:35px; height:auto; float:right; position:relative; top:-20px; } </style> <!-- Element content --> <h1> {{yolo}} </h1> <iron-ajax auto url=" [LINK] " handle-as="json" on-response="handleResponse" last-response="{{ajaxResponse}}"></iron-ajax> <h1>{{ajaxRe
Cites potens · 2016-08 · Stack Overflow · on “How to pass values from iron-ajax to an element at the same level?”
I'm trying to create a new element and I would like to bind data from outside the element, with iron-ajax. I've done something like <iron-ajax ... last-response="{{myval}}"></iron-ajax> <my-elem values="{{myval}}"></my-elem> my problem is (and it's been several hours(days?) I'm trying to find the problem/solution) my element is getting {{myval}} (string, even if I set the property type to Object) instead of the content of the json I get from iron-ajax, I'm pretty lost right now.. the demo code is here [LINK] , the code of my element is here [LINK] but I suspect my problem is really in the demo and not in the element. I've seen this way of doing in polycast 26 [this video] , but the difference is