Skip to content

Instantly share code, notes, and snippets.

@franjohn21
Last active August 29, 2015 14:16
Show Gist options
  • Save franjohn21/ff5ef09affa424d88298 to your computer and use it in GitHub Desktop.
Save franjohn21/ff5ef09affa424d88298 to your computer and use it in GitHub Desktop.
Example deferred, angular dependency injection
.when('/splash/:splash_id',
{
controller: 'splashController',
templateUrl: '/partials/splashlist.html',
resolve: {
latlong: ["$q","$rootScope", "splashFactory",function($q, $rootScope, splashFactory) {
var deferred = $q.defer();
getLocation(deferred, $rootScope, splashFactory);
return deferred.promise;
}]
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment