Skip to content

Instantly share code, notes, and snippets.

@bmelton
Created April 9, 2012 02:27
Show Gist options
  • Save bmelton/2340902 to your computer and use it in GitHub Desktop.
Save bmelton/2340902 to your computer and use it in GitHub Desktop.
A Gentle Introduction to Ember - Concatenating URL
getTweets: function() {
var self = this;
var searchString = Example.get("searchString");
var url = "http://search.twitter.com/search.json?callback=?&q=" + searchString;
$.getJSON(url, function(data) {
for (var i = 0; i < data.results.length; i++) {
self.addItem(Example.Item.create(data.results[i]));
};
})
}
@bmelton
Copy link
Author

bmelton commented Apr 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment