Created
February 3, 2014 14:19
-
-
Save Maqsim/8784641 to your computer and use it in GitHub Desktop.
Angular Resolves Inside Controller
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
module.controller('ControllerName', [ | |
'$scope', | |
'$q', | |
function ( | |
$scope, | |
$q | |
) { | |
var initResources = function (resources) { | |
// init after data loading | |
}; | |
var somePromise = Some.query(); | |
var secondPromise = Second.query({filterObject: {status: 'A'}}); | |
$q.all([somePromise, secondPromise]).then(initResources); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment