Toderp shit and Angular 1.2.0rc2

This commit is contained in:
Max Lynch
2013-09-10 16:12:47 -05:00
parent 7231a42e9f
commit fc1a8270c0
13 changed files with 3298 additions and 26 deletions

26
example/twitter/app.js Normal file
View File

@ -0,0 +1,26 @@
angular.module('ionic.twitter', ['ngTouch', 'ngResource'])
.factory('TweetSearcher', function($resource) {
var searchResource = $resource('http://search.twitter.com/:action', {
action: 'search.json',
callback:'JSON_CALLBACK'
}, {
get: {
method:'JSONP'
}
});
return {
search: function(query) {
return searchResource.query({
q: 'Cats'
})
}
}
})
.controller('SearchCtrl', function($scope, TweetSearcher) {
$scope.search = function(query) {
TweetSearcher.search(query);
};
});