> On 4 Dec 2015, at 06:57, Doug White <[email protected]> wrote:
> 
> 1) Heres my iron-jsonp-library attempt
> 
> 
>       <iron-jsonp-library
>           
> library-url="http://api.bigstockphoto.com/2/{{accountId}}/search/?callback=%%callback%%&q={{query}}";
>           notify-event="api-load"
>           library-loaded="{{loaded}}">
>       </iron-jsonp-library>
> 
> it appears to work fine until the query contains space characters, at which 
> point I get the following error message

I believe the best way to achieve this would be to use a function to URL-Encode 
the variables.

<iron-jsonp-library library-url=“[[_encodeLibraryUrl(accountId,query)]]” .. 
></iron-jsonp-library>

with a supporting _encodeLibraryUrl function as follows:

_encodeLibrary_url: function(accountId, query) {
        return “http://api.bigstockphoto.com/2/“ + 
encodeURIComponent(accountId) + “/search/?callback=%%callback%%&q=“ + 
encodeURIComponent(query);
}

Hope this helps.

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/B5DA7214-B424-43FA-84AA-1BE6DD8B0A78%40bowlhat.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to