Browse Source

replace "comments.json" with this.props.url

main
Bob Eagan 11 years ago
parent
commit
b24d241b82
  1. 4
      docs/tutorial.md

4
docs/tutorial.md

@ -386,13 +386,13 @@ var CommentBox = React.createClass({
}, },
componentWillMount: function() { componentWillMount: function() {
$.ajax({ $.ajax({
url: 'comments.json', url: this.props.url,
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
this.setState({data: data}); this.setState({data: data});
}.bind(this), }.bind(this),
error: function(xhr, status, err) { error: function(xhr, status, err) {
console.error("comments.json", status, err.toString()); console.error(this.props.url, status, err.toString());
}.bind(this) }.bind(this)
}); });
}, },

Loading…
Cancel
Save