Guys does anyone know restangular?
I am trying convert my ajax app that consumes jsonp from the TMDB api.

I cannot seem to get the object correctly and in this case is called 
results.

Here is a url I am using for latest movies.
http://api.themoviedb.org/3/movie/upcoming?api_key=ba5a09dba76b1c3875e487780468ef93

Here is my code using restangular.

Can you please suggest a solution or should I be using the resource method 
and factories to do this and not the following ?
(which does not work yet)
myApp.controller ('ListMoviesCtrl', function($scope, Restangular){
Restangular.setBaseUrl(urlMovies);
Restangular.setDefaultRequestParams({ api_key: 
'ba5a09dba76b1c3875e487780468ef93' })
Restangular.setDefaultRequestParams('jsonp', {callback: 'JSON_CALLBACK'});
$scope.movies = Restangular.all(mode).getList().$object;
$scope.message = 'Yes this is the page';
console.log($scope.movies);
});

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to