javascriptpolymerpolymer-1.0

Polymer Iron Ajax withCredentials default value


Does anyone of you know if it's possible to set the default value of the withCredentials Property of the Polymer iron-ajax element?

The default value is false, but i need it to be true (need it multiple times and i don't want to write with-credentials="true" every time)


Solution

  • You can wrap the iron-ajax element inside a another element. In the new element expose all of the properties of the iron-ajax element.

    That way you can set the property to true and when you need ajax just use the wrapped iron-ajax element.