Questions tagged [iron-ajax]
38 questions
7
votes
1 answer
A promise with iron-ajax response
How can I write a Promise where the response is coming from an iron-ajax.
this.data = …

His
- 5,891
- 15
- 61
- 82
3
votes
1 answer
Cannot access changed array "value" in route function in PolymerJS 3.0? (Using iron-ajax and app-route elements)
I am new to Polymer and currently learning Polymer 3.0. I am trying to make an app which is working as follows:
fetches playlists data from public url (using iron-ajax element)
handle data in handleResponse() func, and assign the value to…

Raj
- 1,100
- 3
- 20
- 33
2
votes
1 answer
Iron-list doesn't show data fetched from iron-ajax
I'm new to Polymer so I tried almost everything that I found on Internet, but it didn't work. I got only a white page. What I'm doing wrong?
This is my code

Dani Pani danipani
- 25
- 3
2
votes
1 answer
Polymer: How to store REST API base URL in configuration file
I'm using polymer starter kit.I have to make many API calls in different HTML pages and for each API call, I'm using "iron-ajax" in that for 'url' property I'm assigning REST API URL.
URL will be like "https://XXXXX.in/YY/YY/YY" ,Here base URL …

ksh
- 639
- 1
- 7
- 23
2
votes
2 answers
Iron-ajax url with String from parent element doesn't work
In my Polymer app, I want to read a JSON file, for this I use an element. Part of the url is send by the parent element of the element currently using this .
My String is properly recovered, i tried to just display it and it return exactly what I…

Rhohen
- 35
- 5
1
vote
1 answer
iron-ajax bind and write JSON to file
I have the following iron-ajax element in my html:
And I have this in the js file for the above html:
Polymer({
is:…

lte__
- 7,175
- 25
- 74
- 131
1
vote
0 answers
Polymer 3 CORS with iron-ajax
I am trying to make an get call using iron-ajax as follows:
But am getting the…

Matthew Mills
- 103
- 1
- 3
- 14
1
vote
1 answer
How to submit iron-form via ajax in Polymer 3
The Problem
I want to submit an iron-form in Polymer 3. I use a paper-button and the form has to be submitted via iron-ajax.
This is my view.js
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
import…

Lukas
- 13
- 4
1
vote
1 answer
How to trigger iron-ajax on button click in Polymer-3.x?
I am creating a polymer element which uses iron-ajax. This will hit a public API to fetch a random fox imageUrl and dispaly in DOM.
Requirement
On clicking button, i want to make a new call to the api, this will give me new url.
Currently i am using…

Raj
- 1,100
- 3
- 20
- 33
1
vote
1 answer
How to addEventListener to Polymer 2.0 iron-forms loaded with iron-ajax within dom-repeat template
I have been using the following syntax to edit iron-form requests before submitting in Polymer 2.0:
connectedCallback() {
super.connectedCallback();
someForm.addEventListener('iron-form-presubmit, function() {...})
}
Now I want to load…

bill88
- 13
- 4
1
vote
1 answer
Dealing with text/plain in iron-ajax and dom-repeat
I have an API which unfortunately returns text/plain elements. Although the output format is JSON, the mime type is text/plain.
When using iron-ajax to request output from the API, I can store the output in a String called response. However, I…

TheWaveLad
- 966
- 2
- 14
- 39
1
vote
1 answer
sinon fake xhr server and polymer appLocalizeBehavior locales
I am developing a web frontend using Polymer. I have a webcomponent which uses other webcomponents, for example a paper-input or some custom webcomponents. For demo purposes i am using the sinon fake xhr server to mock some elasticsearch requests,…

TobiasB
- 25
- 3
1
vote
1 answer
Not able to bind data from local json to view polymer 2
I am using Polymer 2 and want to bind data from a local json file. But each time I tried it it is not able to fetch the json file only.
There are 2 ways I have tried to achieve it with:
1) USING

Shivansh Rajolia - HeLleR
- 610
- 6
- 12
1
vote
1 answer
Polymer 2 iron-ajax with handleAs=xml bug?
I have the following code:

PowerStat
- 3,757
- 8
- 32
- 57
1
vote
2 answers
Polymer, iron-ajax, and PHP back end - how to receive an array?
I have a simple iron-ajax element like this:
Then later in javascript I add some parameters to the request, one of them being an array:
var request = this.$$("#ajax_email");
request.params.to =…

Hubert
- 369
- 3
- 21