orizens / echoes

Echoes is a media player based on youtube which provides a great user experience (no ads!). Overall, it's a web application that is based on angular.js & bootstrap.
http://orizens.github.io/echoes/index.html
MIT License
336 stars 69 forks source link

wrap "gapi" calls with $q.when #81

Open orizens opened 9 years ago

orizens commented 9 years ago

that - in order to avoid injecting $scope/scope.
in uGapi:

function insert (params) {
                return $q.when(gapi.client.youtube[resourceName].insert(params))
                    .then(function (response) {
                        return response;
                    });
            }

then, other services/controllers don't need to use $scope.$apply (like in UserPlaylists).