Last active
August 29, 2015 14:16
-
-
Save franjohn21/ff5ef09affa424d88298 to your computer and use it in GitHub Desktop.
Example deferred, angular dependency injection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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