-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with params #48
Comments
You need to specify ALSO, you cannot do binding in the middle of an attribute value the way you did for Below is a fixed-up version of your example: Polymer({
is: "yts-movie",
properties: {
movieId: {
type: Number,
value: 15
}
}
ready: function() {
console.log('ready yts-movie')
},
paramsForMovieId: function(movieId) {
return { movie_id: movieId };
},
ytsMovieResponse: function(event, result){
console.log(result.response)
}
}); <iron-ajax
auto
url="https://yts.to/api/v2/movie_details.json"
params="{{paramsForMovieId(movieId)}}"
handle-as="json"
on-response="ytsMovieResponse"
debounce-duration="0">
</iron-ajax> Please refer to https://github.com/Polymer/polymer/blob/master/PRIMER.md#annotated-computed-properties for more information on annotated computed properties. |
Great! Thanks! |
Hi!
How to pass params from properties?
In this case,
movieId
:request HTTP is
https://yts.to/api/v2/movie_details.json?0=%7B&1=%22&2=m&3=o&4=v&5=i&6=e&7=_&8=i&9=d&10=%22&11=%3A
The text was updated successfully, but these errors were encountered: